I am trying to use an adjacency list with bundled properties.
So I type my graph data stucture as so:
struct MyV {
int numOnVertex;
};
struct MyE {
int numOnEdge;
};
typedef adjacency_list MyGraph;
I would like to use the read function as defined in
adjacency_list_io.hpp, so I can read in my special graph from a file
that looks like below.
# 3 vertices, v0.numOnVertex=6, v1.numOnVertex=5, v2.numOnVertex=3
v
0 6
1 5
2 3
# 3 edges, edge 0, numOnEdge=0; edge 1, numOnEdge=3, edge 2, numOnEdge = 3
e
1 2 0
0 1 3
1 0 3
I can't seem to figure out a simple way to do IO with bundled properties.
When I try these lines:
MyGraph g;
cin >> read(g);
I get the error:
C:\boost_1_33_1\boost/graph/adjacency_list_io.hpp(153) : error C2679:
binary '>>' : no operator found which takes a right-hand operand of type
'MyV' (or there is no acceptable conversion)