-
Notifications
You must be signed in to change notification settings - Fork 19
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
add_vertex! API #41
Comments
I'm indifferent here. If I had designed it, I'd have it return |
MetaGraphsNext.jl is actually a wrapper, so I wouldn't try to impose a new style. nvnum = nv(mg.graph)
add_vertex!(mg.graph)
if nv(mg.graph) != nvnum ... If you agree with this changes, let me know and I can start working on a PR to substitute such checks. |
Sure that sounds good thanks! |
I also agree with this :) |
can you please assign this issue on me, so that I don't forget this ? |
Related issue: JuliaGraphs#41
Fixed by #47 |
Some discussions (JuliaGraphs/Graphs.jl#122, JuliaGraphs/Graphs.jl#146, JuliaGraphs/Graphs.jl#165) argue that
add_vertex!
should return the index of the newly added vertex. Currently, the compromise is thatadd_vertex!
returnsBool
.Would you consider entering a transient phase and support both ?
For example, this would mean appropriately modifying the following line:
MetaGraphsNext.jl/src/graphs.jl
Line 117 in 71cf31d
A valid alternative would be to check
nv(meta_graph.graph)
before and after theadd_vertex!
operation.Motivation
As mentioned in #40 and QuantumBFS/Multigraphs.jl#17 I would like to generalize the use cases for MetaGraphsNext and more specifically have it work with Multigraphs.
Multigraphs.jl
'sadd_vertex!
already return an index.The text was updated successfully, but these errors were encountered: