
Follow-up: It appears to be related to the edge_weight property. Judging by the documentation I was under the impression that this was a default property that all edges would have. Is this not the case? How would I add it? I already tried putting a "double edge_weight" field in my EdgeProperties struct, didn't help.

Judging by the documentation I was under the impression that this was a default property that all edges would have. Is this not the case? How would I add it?
I already tried putting a "double edge_weight" field in my EdgeProperties
struct, didn't help.
There are no default edge properties - no default vertex properties either (with a few exceptions). If you are using bundled properties, then you have to wrap the access to your edge weights with a property map and pass that map to various algorithms. For example: typedef property_map<Graph, dobule EdgeProps::*>::type WeightMap; WeightMap wm = get(&EdgeProp::weight, g); Edge e = // get some edge descriptor from g assert(g[e].weight == wm(e)); Passing wm to algorithms will allow them to use your custom edge weights. Andrew Sutton andrew.n.sutton@gmail.com
participants (2)
-
Andrew Sutton
-
Lindley M French