Boost logo

Boost Users :

Subject: [Boost-users] newbie question on boost/graph library: how to use read_graphViz with bundled vertex/edge properties
From: Rong She (rshe_at_[hidden])
Date: 2010-03-22 22:26:58


I have declared CustomVertex and CustomEdge classes, each with a bunch of internal properties.
class CustomVertex {
     int length;
     string name;
     bool ori;
public:
     CustomVertex() {}
    ~CustomVertex() {}
    FlipVertex() { ori = !ori; }
};
class CustomEdge {
     char type;
     int distance;
     bool src_ori;
     bool dst_ori;
public:
     CustomEdge() {}
    ~CustomEdge() {}
};

Tried to use bundled properties, the graph is defined as:
typedef adjacency_list<vecS, vecS, directedS, CustomVertex, CustomEdge> myGraph;

I want to read from a dot file (which contains all appropriate vertex, edge information) and populate the graph. I know I'm supposed to use dynamic_properties etc. Could someone show me how exactly? Thanks.


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