Boost logo

Boost :

Subject: Re: [boost] [Graph] component_index crash on big graph
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-07-07 21:15:59


On Tue, Jul 7, 2009 at 8:21 AM, Andrew Sutton <andrew.n.sutton_at_[hidden]>wrote:

> >
>
> > > Thanks Andrew, I got confused with add_vertex and add_edge allocation
> > properties. I have modified the code create numEdges. However the problem
> > occurs while building component_index which does not access graph data
> > structure but rather only the parent map. Attached is the modified file
> > (also at http://codepad.org/5dZM6YBo).
>
>
> I get confused too. I didn't write the class, so it's hard to remember.
> Just
> a heads up, though. The adjacency class has a constructor that takes a
> number of vertices and pre-allocates them. For example:
>
> graph g(20);
> cout << num_vertices(g); // prints 20.
>
> Hi Andrew,
 Got it. Back of my mind, I think I was uncomfortable about conversion from
int to vertex_descriptor.
The final status is that Jeremiah verified that the code runs fine on gcc
over the large input. Hence its quite possible a bug, and should be filed as
such.
He suggested a workaround i.e. use ds.compress_sets() and then collect the
component. So my problem is resolved.

I also have issues with the documentation of incremental component which I
shall post separately.

Appreciate the help.

-Sandeep


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