Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-07-25 09:03:52


Hi Rob,

The problem is that you are using an adjacency_list with the template
parameter VertexList=listS, which means that vertex descriptors are not
integers as they are when VertexList=vecS, and you are using int* for the
component map, which expects the key type (the vertex descriptor) to be an
integer.

There are two ways to fix the problem. Either use VertexList=vecS or
change the component map, either by using an internal property for the
component or by using an internal vertex ID property to map into an
external array using iterator_property_map.

Cheers,
Jeremy

On Wed, 25 Jul 2001, Rob Smallshire wrote:

> Hi Jeremy,
>
> > > Q1:
> > >
> > > Compiling the following two lines:
> > >
> > > std::vector<int> component(boost::num_vertices(G));
> > > int num = boost::connected_components(G, &component[0]);
> >
> > Could you show my what type G is. A small compilable program example
> > demonstrating the problem would be best.

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk