-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Example below:
g = SimpleGraph()
mg = MetaGraph(g, String, Nothing, Nothing)
for c in 'a':'d'
add_vertex!(mg, string(c))
end
add_edge!(mg, "a", "b")
has_edge(mg, "a", "b")
ERROR: method has_edge not implemented.I.e., add_edge! works on the labels of the MetaGraph but has_edge works with the codes. This is especially surprising if you (contrary to recommendations) go with Integer labels:
g = SimpleGraph()
mg = MetaGraph(g, Int, Nothing, Nothing) # <--- Int label
for i in 3:6
add_vertex!(mg, i)
end
add_edge!(mg, 3, 4)
has_edge(mg, 3, 4)(where, current API requires us to do has_edge(mg, code_for(mg, 3), code_for(mg, 4)) to get a meaningful result.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation