Boost logo

Boost Users :

From: David M. Jones (djones_at_[hidden])
Date: 2004-10-19 09:40:19


"Martin Magnusson" <martin.magnusson_at_[hidden]> wrote in message
news:cl2vmc$lob$1_at_sea.gmane.org...
> I'm using BGL, and I noticed that add_vertex returns a vertex_descriptor
> to the new vertex. However, I would like to have a vertex_iterator
> pointing to the same element. Is there a way to construct a
> vertex_iterator when given a vertex_descriptor?

Martin,

If I have a BGL graph object g and a vertex descriptor vd, then
   std::find(vertices(g).first, vertices(g).second, vd)
will return an iterator that points to vd.

Hope this helps,
David M. Jones


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