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

Consistency in dealing with empty edges #403

Open
nwlandry opened this issue Jun 14, 2023 · 0 comments
Open

Consistency in dealing with empty edges #403

nwlandry opened this issue Jun 14, 2023 · 0 comments

Comments

@nwlandry
Copy link
Collaborator

Currently, some XGI methods support empty edges and some do not.

Ones that do:

  • dual(): the dual of a hypergraph with isolated nodes must have empty edges.
  • add_edges_from() so long as the empty edges is not first and if it is, it raises an IndexError as it tries to access list(first_edge)[0] (in the case of a list of sets)

Ones that do not:

  • add_edge(): this raises an XGIError for an empty edge.
  • remove_nodes_from(), remove_node(), and remove_node_from_edge(): these functions delete edges if removing a node creates an empty edge.
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

No branches or pull requests

1 participant