I'm using it right now to represent a subgraph, where since I'm not looking
up the index of a vertex in the subgraph very often, and the dijkstra
implementation requires the vertex indices to be less than or equal to the
number of vertices, I'm doing it by binary search through the vector of
vertices included in the subgraph.


On Fri, Jul 26, 2013 at 11:23 AM, Dahua Lin <notifications@github.com>wrote:

> In src/depth_first_visit.jl:
>
> > @@ -41,13 +41,13 @@ function depth_first_visit_impl!(
> >
> >          if !found_new_vertex
> >              close_vertex!(visitor, u)
> > -            colormap[vertex_index(u, graph)] = 2
>
> Yes, vertex_index(u, graph) might seem cumbersome and unnecessary. But,
> there was deeper consideration behind that. By using this syntax, we allow
> people to implement new graph types where vertex index is not directly
> stored with the vertex, instead it may be looked up from the graph. I hope
> this does not create a lot of trouble for algorithm implementers.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/JuliaLang/Graphs.jl/pull/42/files#r5425039>
> .
>