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

[Port] [BUG] adjacency_matrix fails for SimpleGraph with self-loops (Julia 1.7) #67

Closed
gdalle opened this issue Nov 11, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@gdalle
Copy link
Member

gdalle commented Nov 11, 2021

See sbromberger/LightGraphs.jl#1594

@gdalle gdalle added the bug Something isn't working label Nov 11, 2021
@etiennedeg
Copy link
Member

Fixed by #15

@gdalle
Copy link
Member Author

gdalle commented Nov 15, 2021

@etienneINSA what is the rationale of allowing loops in a SimpleGraph? I'm all for a more explicit error message, but shouldn't this be forbidden from the start?

@gdalle gdalle reopened this Nov 15, 2021
@etiennedeg
Copy link
Member

etiennedeg commented Nov 16, 2021

In my understanding, SimpleGraphs (in the context of this library) allows self-loops (but no multiple edges), but I may be wrong... @jpfairbanks ?
If not, there is some work as there are no checks anywhere, and I have already encountered functions in the library which return graphs with self-loops.

@simonschoelly
Copy link
Contributor

Self-loops where at one point allowed on purpose. And I would agree, while the strict mathematical definition of a simple graph does not allow self-loops, it is a nice feature to have.

One downside of that is though, that it adds additional edge cases that have to be checked for some algorithms.

@simonschoelly
Copy link
Contributor

Fixed by #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants