I want all the ribs to have properties, weight and capacity. I found that BGL is already defined. Therefore, I define Edge and Vertex properties for Graph
typedef property<vertex_name_t, string> VertexProperty;
typedef property<edge_weight_t, int, property<edge_capacity_t, int> > EdgeProperty;
typedef adjacency_list<listS,vecS, undirectedS, VertexProperty, EdgeProperty > Graph;
This is where I try to add edges to the graph:
172: EdgeProperty prop = (weight, capacity);
173: add_edge(vertex1,vertex2, prop, g);
If I had only 1 property, I know that it will be prop = 5; However, with the two, I am confused about formatting.
Here is the error I get:
graph.cc: In function ‘void con_graph()’:
graph.cc:172: warning: left-hand operand of comma has no effect
source
share