On Thu, 27 Jan 2011, David Doria wrote:
I have two questions:
1) I am trying to iterate through the edges of a graph and output their edge weights. I am confused though. I know how to output the "edges", but they are actually just a (vertex, vertex) pair which defines the edge. So do I index *edgePair.first into the EdgeWeightMap to get the weight of the edge starting from vertex *edgePair.first? Or how else would I get the weight associated with a particular edge?
Code snippet: http://stackoverflow.com/questions/4810589/output-bgl-edge-weights
2) I have created a struct, and used it as a template parameter to adjacency_list. However, when I try to add_edge(vertex1, vertex2, property, graph) , the compiler complains "no matching function call". Can anyone see where I've gone wrong?
Code snippet: http://stackoverflow.com/questions/4810235/bgl-bundled-properties-add-edge-n...
Any suggestions on either of these?
I just answered both on StackOverflow; the issue is, as the later posts say, using an edge property in the VertexProperty slot of the adjacency_list template parameter list. -- Jeremiah Willcock