Boost logo

Boost Users :

From: Greg Landrum (greg.landrum_at_[hidden])
Date: 2005-08-26 08:46:55

Jeremy Siek wrote:
> Yes, it sounds like you need to modify the type definition for your
> graph. (at least, that will give you the best efficiency. You could
> also use a hash table of some sort provided you don't have
> parallel edges in your graph)

Ok, thanks. The solution I've been using to the problem of
"biconnected_components ate my graph!" is to copy the graph before
making the call and to work from the copy. This seemed a cleaner
solution than adding additional data to the graph itself in order to be
able to call one algorithm (at least in the short term).

> BTW, in the BGL, a const graph parameter means that the algorithm
> will not add or remove vertices or edges, but it does not necessarily
> mean
> that the algorithm will not modify properties of the edges or
> vertices... that is determined by the kind of property map that
> the algorithm requires, in this case the ComponentMap must
> be a Writable Property Map.

Thanks for this clarification. I was quite surprised to see a const
graph parameter changing in an algorithm call, but now I see why.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at