|
Boost : |
From: Janusz Piwowarski (jpiw_at_[hidden])
Date: 2003-08-09 12:27:57
Hi all
I've found bug in incremental_components examples and
documentation. Type _Rank_ is expected to be size_type, but
container _rank_ is created from vertex_descriptor. Examples work
because adjacency_list VertexList container type is vector.
// ...
typedef adjacency_list <vecS, vecS, undirectedS> Graph;
typedef Graph::vertex_descriptor Vertex;
// ...
// create the disjoint-sets structure, which requires
// rank and parent vertex properties
std::vector<Vertex> rank(num_vertices(G));
// ^^^^^^
std::vector<Vertex> parent(num_vertices(G));
typedef std::vector<Graph::size_type>::iterator Rank;
// ^^^^^^^^^^^^^^^^
typedef std::vector<Vertex>::iterator Parent;
disjoint_sets<Rank, Parent> ds(rank.begin(), parent.begin());
//...
Regards,
Janusz
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk