|
Boost Users : |
From: Ewgenij Sokolovski (ewgenijkkg_at_[hidden])
Date: 2007-07-07 08:22:29
Hello, I want to apply dijkstra_shortest_paths to my Graph. I have added the lengths of the edges with while adding the edges with the function
add_edge(vi, vj, distance, *nodesGraph)
where vi, vj are the vertex descriptors, distance is the length of the edge and nodesGraph is a pointer to my graph. Now I need to provide an appropriate property map for the bundled property "distance". In the manual I read that I have to provide a member pointer to the property value:
file:///usr/share/doc/packages/boost-doc/libs/graph/doc/bundles.html
But in my case I do not have a class with members like 'Highway' in the manual. In my case the bundled property is represented by a single float value. And so I need access to it, not to some members of it. I tried to write weight_map(get(&float, myGraph)) instead of weight_map(get(&Highway::miles, map)) in the example, but then I get a compiler message "expected primary expression before "," token". So how can I access the distance? Or comes the compiler message due to some other bug in my code?
Ewgenij
-- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
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