Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL - VertexList of adjacency_list = boost::setS?
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-10-30 11:27:53


> typedef boost::adjacency_list<boost::listS,boost::setS> Graph;
> Graph g;
> boost::add_edge(0,1, g);
>

0 and 1 are not descriptors if you use any selector other than vecS, hence
the "cannot convert" error. There should be a function vertex(n, g) that you
can use to return a descriptor to the nth vertex in these cases, but be
forewarned: it's O(V).

add_edge(vertex(0), vertex(1), g);

Andrew Sutton
andrew.n.sutton_at_[hidden]



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net