Boost logo

Boost Users :

From: Micha³ Nowotka (mmmnow_at_[hidden])
Date: 2007-12-09 07:10:58


Hello,
I'm boost newbie and have some problems with write_graphviz function.
I've already asked this question but perhaps with bad subject so i
try again. Sorry if you read this second time.

In write_graphviz function documentation I can read that
PropertyWriter can be used for print both: interior and exterior
properties for each vertex of a graph into the graphviz format file. I
can find some example of printing graph properties stored in property
maps, for example calling:

write_graphviz(std::cout, g, make_label_writer(name));

when the graph have 'name' property map.

but how to do that when storing properies as bundled properies?

I defined following graph:

typedef adjacency_list<vecS, vecS, bidirectionalS, Vect_f, Edge_f> Graph;

where:

struct Vect_f
   {
      int factor;
      int lowlink;
      int component;
      int color;
      bool in_stack;
   };

struct Edge_f
   {
      int num_visited;
      int color_k;
   };

and I want to lay out and print my graph with coloured vertexes (I can
always change the type of colour property for more suitable if
necessary) but I dont't have any idea to do this. Is it possible at
all?

Cheers,

Micha³ Nowotka


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