
On 4/19/06, Fred Labrosse
All,
First, I'm very new to boost and BGL, so please forgive me if this is trivial.
I've created a graph (adjacency_list) using bundled properties and am now trying to write it as a dot file. I've written my property writer, but when I compile, I get several of:
/usr/include/boost/graph/graphviz.hpp: In function `void [snip] Not being very good at deciphering all that, I'm not sure what is happening. I do understand that it's missing an extraction operator but I'm not sure on what. The actual line in graphviz.hpp is:
out << get(vertex_id, *i);
Two questions:
- Could somebody tell me exactly what that get returns?
get returns the value from vertex_descriptor *i in the property map vertex_id In your code, your adjacency_list uses listS so this vertex_id property is not define! That's the problem. When you call write_graphviz, specify a property map to get an index from a vertex_descriptor (follow the example with write_graphviz and dynamic properties)
- From the dot format, this should be the name of the vertex in the dot file. So this seems to relate to the class used as a property. My second question is then: If this is the case, why then do we need the property writer since we apparently also need the operator<< that could do exactly the same thing? (And isn't a ' ' (space) missing between the vertex name and whatever the property writer writes (or should that be included in it, which is not mentioned by the documentation)? That was 3 questions then ;-)
I don't understand your second question, neither question 3... I think it relates to your first question.
Thanks in advance for any replies.
Cheers,
Regards, -- Johan