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.


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> 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> 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> How can I edit this code to using the add_vertex call from the
ajames> MutablePropertyGraph ala:
ajames> // how to express vp?
ajames> member_vertex_t vertex = boost::add_vertex(vp, __graph);
ajames> --aj

 Jeremy Siek
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster ( office phone: (812) 856-1820

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at