[Boost.Graph]: read_graphviz into std::vector

Hi,
I have graphes in the .dot format, with 24 vertex labels d1-d24, each
storing one double.
I want to use
struct Vertex_p
{
std::string node_id;
std::vector<double> d;
}
as the bundled property for my graph in boost and use read_graphviz to
load the graph. How do I have to construct the property_map and the
dynamic_properties?
This
property_map

Hi Sascha,
Here is a small example program I wrote that seems to do what you
want. The main difference is that it "gets" the property map
and places it in the dynamic properties at the same time:
#include
Hi,
I have graphes in the .dot format, with 24 vertex labels d1-d24, each storing one double. I want to use struct Vertex_p
{ std::string node_id; std::vector<double> d; }
as the bundled property for my graph in boost and use read_graphviz to load the graph. How do I have to construct the property_map and the dynamic_properties? This
property_map
::type g_d = get(&Vertex_p::d, graph); g_dp.property("d",g_d); does not work. Is it even possible to do something like this?
Thanks for any help, Sascha _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Ronald Garcia
-
Sascha Winter