-
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
Different code- vs. label- API for has_edge
vs. add_edge!
#78
Comments
You're right, a function |
Yeah, that's a potential issue indeed: but should there really be a code-access Alternatively, has there been any discussion of introducing a special |
It is necessary to comply with the Graphs.jl interface, otherwise you'd have to call all graph algorithms with |
I see. That's too bad. Is there a sense in which some of these issues could be alleviated if Graphs.jl had an internal type like struct Vertex{T<:Integer}
v :: T
end with the iterates of |
One of the key drivers behind Graphs.jl 2.0 conversations is the desire to support arbitrary vertex types. In that sense, we will no longer need the distinction between labels and vertices, at least on a surface level |
As of right now I don't think there is a good solution to your problem, aside from documenting this caveat. Do you want to open a PR? |
Example below:
I.e.,
add_edge!
works on the labels of theMetaGraph
buthas_edge
works with the codes. This is especially surprising if you (contrary to recommendations) go withInteger
labels:(where, current API requires us to do
has_edge(mg, code_for(mg, 3), code_for(mg, 4))
to get a meaningful result.The text was updated successfully, but these errors were encountered: