|
Boost Users : |
From: Stephen torri (storri_at_[hidden])
Date: 2004-11-08 15:50:23
How does one write out the proper edge node names when the vertex data
is a boost::shared_ptr? My graph is defined as:
typedef property< vertex_index_t, uint32_t,
property< vertex_name_t, boost::shared_ptr<Component> > >
VertexProperty;
typedef adjacency_list<setS, // OutEdgeList
setS, // VertexList
directedS, // Directed
VertexProperty> // VertexProperties
Graph_Type;
The call in graphviz.hpp at line 269 has me confused. I understand that
the node ids are printed out by looking for the value stored in the
vertex_index_t property, graphviz.hpp at line 263. So if the value
stored at the vertex_index_t property was the value '3' the node's name
would be '3'. The edges are what have me confused. I would expect that
the source id and the target it would be the value of the
vertex_index_t property. So if there are two nodes the dot file would
be:
0[label="A"];
1[label="B"];
0 -> 1;
Yet with a boost::shared_ptr stored in a vertex_name_t property I get:
0[label="A"];
1[label="B"];
0x807a108->0x807a128;
Well anything starting with a '0x' is ambigiuos to the dot parser. It
breaks the 0x807a108 into two names.
I need to use a boost::shared_ptr for my data. I believe I have not used
the right boost::property type. Is that right?
What I expect to see as output for the dot file is:
0[label="A"];
1[label="B"];
0->1;
Stephen
-- Email: storri_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