Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2003-12-13 12:08:19


Hi AJ,

The file example/transitive_closure.cpp contains an example of how to
do this.

Cheers,
Jeremy

On Fri, 12 Dec 2003, AJ wrote:
ajames> I have read the documentation and hve seen that there is an add_vertex
ajames> method that allows a vertex to be added at the same time that a vertex
ajames> property is set. Unfortunately the docs do not make it clear to me
ajames> exactly what type I'm supposed to pass as the vertex property.
ajames>
ajames> If I have code like the following where I get a vertex property map from
ajames> a graph, add the vertex, and then set the property:
ajames>
ajames> member_names_t member_names = boost::get(boost::vertex_name_t(),
ajames> __graph);
ajames> member_vertex_t vertex = boost::add_vertex(__graph);
ajames> boost::put(member_names, vertex, name);
ajames>
ajames> How can I edit this code to using the add_vertex call from the
ajames> MutablePropertyGraph ala:
ajames>
ajames> // how to express vp?
ajames> member_vertex_t vertex = boost::add_vertex(vp, __graph);
ajames>
ajames> --aj
ajames>

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 856-1820
----------------------------------------------------------------------


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