[BGL] Simple question about accessing vertex property
Hi,
How do I access the vertex_index property of a vertex? Is it necessary
to use the get function? More precisaly, let us consider the following:
typedef adjacency_list
hi,
i've implemented an extended form of 'fill' algorithm that can handle
multi-dimensional containers and would appreciate comments on whether:
a) i've reinvented the wheel and such code is already available in boost,
b) i've made some obvious mistake that my (admittedly minimal) testing
hasn't found yet,
c) it would be useful to anybody :)
the code is given below (namespace declarations removed):
template
On Oct 9, 2005, at 9:56 AM, Giulio Veronesi wrote:
How do I access the vertex_index property of a vertex? Is it necessary to use the get function? More precisaly, let us consider the following:
typedef adjacency_list
> TGraph; typedef graph_traits<TGraph>::vertex_descriptor TNode;
Suppose that 'vertex' is a TNode. Is it correct to do
int idx = vertex;
to get in idx the vertex_index of vertex?
It is correct for adjacency_list when vertex_listS = vecS. In the more general case, one would write: graph_traits<TGraph>::vertices_size_type idx = get(vertex_index, graph, vertex); Doug
participants (3)
-
Doug Gregor
-
Giulio Veronesi
-
Ian Whittley