-
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
Empty constructor to initialize Metagraphsnext #65
Comments
I think the problem is that However, having |
Thank you for the suggestion! However I don't think such an empty constructor is a good idea, because default vertex and edge data types are very arbitrary, and the user may not be aware of those choices |
What about e.g. we could define the following constructor function MetaGraph{C, G, L, VD, ED, GD}() where {C<:Integer, G<:AbstractGraph{C}, L, VD, ED, GD}
return MetaGraph(G(), L, VD, ED, GD)
end My personal use case is that I want to make an empty copy of a graph. But I would like that to be consistent with all |
That sounds reasonable, but then again depending on the underlying graph type the constructor |
At the moment MetaGraphs.jl/src/metagraphs.jl has an empty constructor which can be used to implement empty graphs. Also, the package Graphs.jl has empty constructors.
Similarly, can we have an empty constructor at MetaGraphsNext.jl/src/metagraphs.jl for constructing empty graphs of type MetagraphsNext?
Sample code:
With the help of this constructor we can initialize
The text was updated successfully, but these errors were encountered: