A downside of this is that the output of vertices(g::NamedGraph) no longer has a well-defined ordering corresponding to the memory ordering of the vertices of the parent graph, and instead should be treated as, and now outputs, a set. However, an upshot is that vertex lookup is faster (O(1) instead of O(nv(g))), and user code shouldn't rely on vertex ordering anyway so I think it forces better code style.
A downside of this is that the output of
vertices(g::NamedGraph)
no longer has a well-defined ordering corresponding to the memory ordering of the vertices of the parent graph, and instead should be treated as, and now outputs, a set. However, an upshot is that vertex lookup is faster (O(1)
instead ofO(nv(g))
), and user code shouldn't rely on vertex ordering anyway so I think it forces better code style.