Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup hypergraph methods #146

Merged
merged 10 commits into from
Aug 4, 2022
Merged

Cleanup hypergraph methods #146

merged 10 commits into from
Aug 4, 2022

Conversation

leotrs
Copy link
Collaborator

@leotrs leotrs commented Jul 28, 2022

Continued progress on #94

  1. H.isolates is now H.nodes.isolates and returns a NodeView.
  2. H.singleton_edges is now H.edges.singletons and returns an EdgeView.

There are two related convenience methods, H.remove_isolates and H.remove_singleton_edges that I have left for now, though I think they should both go in the future in favor of a general cleanup method (see #36).

@nwlandry
Copy link
Collaborator

Two thoughts:

  1. We already have remove_nodes_from and remove_edges_from so it wouldn't be too terrible to get rid of remove_isolates and remove_singleton_edges, since we could just do H.remove_nodes_from(H.nodes.isolates) and H.remove_edges_from(H.edges.singletons)
  2. I would update the docs to match the changed location of these methods.

@nwlandry nwlandry self-requested a review July 28, 2022 19:15
Copy link
Collaborator

@nwlandry nwlandry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment.

@leotrs
Copy link
Collaborator Author

leotrs commented Aug 4, 2022

Done!

@nwlandry nwlandry merged commit 44b646e into main Aug 4, 2022
@nwlandry nwlandry deleted the cleanup-hypergraph-methods branch August 4, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants