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

Same edge (by members) gets multiple IDs in erdos_renyi_hypergraph #34

Closed
maximelucas opened this issue Dec 19, 2021 · 4 comments
Closed

Comments

@maximelucas
Copy link
Collaborator

maximelucas commented Dec 19, 2021

Working on #29 to remove singletons, I came across this:
Running

import xgi
n = 10
m = 50
p = 0.1
H = xgi.erdos_renyi_hypergraph(n, m, p)

then in H._edge, a given edge sometimes appear more than once with different IDs, e.g. { 38: [9], 39: [9], 48: [9], ...}.

In addition, not all nodes are present in edges as a singleton. For example, there is a node 8 but no singleton edge [8].

Haven't checked if #33 fixes this?

@nwlandry
Copy link
Collaborator

The hypergraph class currently supports self-loops and multi-edges. I would be fine with eliminating these artifacts, but as of right now, it works as I would expect, though maybe not desirable. Happy for any suggestions.

@leotrs
Copy link
Collaborator

leotrs commented Jan 20, 2022

I think it should be kept as is. We can always remind the user to clean up the graph after the generator returns the hypergraph object.

@nwlandry
Copy link
Collaborator

That sounds good to me!

@leotrs
Copy link
Collaborator

leotrs commented Jan 20, 2022

If @maximelucas agrees, please close this issue :)

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

3 participants