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

Implicit graph structure #109

Open
gdalle opened this issue Feb 25, 2022 · 2 comments
Open

Implicit graph structure #109

gdalle opened this issue Feb 25, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@gdalle
Copy link
Member

gdalle commented Feb 25, 2022

Apparently, the old Graphs.jl package made it possible to define a graph implicitly, where neighbors of a vertex are generated just-in-time instead of being stored statically (source: https://github.com/Shushman/MultiAgentPathFinding.jl).
I see no reason why the current interface would not allow this, is there?

@etiennedeg
Copy link
Member

I think the API allows neighbors to be returned as an iterator and it should be enforced in the codebase (see for example this PR). The fact that the documentation says that neighbors returns a list is an inaccuracy of the documentation. I may be wrong though (cc @simonschoelly).

@gdalle gdalle added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 10, 2022
@simonschoelly
Copy link
Contributor

That thing with the list might have been inspired by networkx. I would agree, that one should be able to generate the neighbors implicitly. I would even say, that the current implementation for Simple{Di}Graph is dangerous, as one could accidentally modify the graph this way.

Another example of implict neighbors is https://github.com/JuliaGraphs/SpecialGraphs.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants