On 11/15/05, Stephane Grabli
Hi,
I'm new to the BGL and I'm trying to use the strong_components algorithm, defined this way:
template
typename property_traits<ComponentMap>::value_type strong_components(Graph& g, ComponentMap comp, const bgl_named_params & params = all defaults)
with a graph defined like this:
typedef adjacency_list
Graph; (in particular using listS for vertices storage).
Does anyone know how I should declare the ComponentMap property map? I couldn't figure this out from the documentation and the examples I've seen all assume that a vecS type storage is used for vertices in the graph. Thanks!
Stephane
Here's one way to do it:
(1) declare an interior vertex index map.
(2) initialize the interior vertex index map.
(3) compose the interior vertex index map with a vector property map.
For step (1), just replace your graph declaration with
typedef adjacency_list