|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2003-08-09 20:12:33
Thanks Janusz. I've checked in the fixes.
On Saturday, August 9, 2003, at 12:27 PM, Janusz Piwowarski wrote:
> 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
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk