-
Notifications
You must be signed in to change notification settings - Fork 93
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
SimpleGraph(::Base.OneTo)
#365
Comments
While this makes sense for SimpleGraphs, the method you defined for general graphs would not be guaranteed to work in general. Typically, there are some graphs that cannot exist without edges (think grids) so the constructor would fail. |
Adding this will make the big list of @mtfishman If you don't strongly object I will close this as wontfix for now. |
Obviously up to you, I would still like this kind of interface, however I suppose it could be implemented through an orthogonal interface outside of constructors, such as |
In that case lets keep the issue open for now. |
That's fair, that was just a random example, but the more general concept is that it would be nice to have a more general interface, either through constructors or otherwise, for constructing a graph from a set of vertices rather than just the number of vertices. |
I think it would be helpful to add constructors:
representing the more general concept of constructing a graph from a set of vertices. It would enable writing generic code like:
which would work with graphs that don't have simple vertices.
This is analogous to constructing Julia arrays from axes:
(though for whatever reason
Matrix{Float64}(undef, (Base.OneTo(3), Base.OneTo(3)))
doesn't work).The text was updated successfully, but these errors were encountered: