[graph] predecessor_recorder and VertexList=listS
Hello list members,
I've following graph:
typedef adjacency_list
I've following graph: typedef adjacency_list
, cPose> BGLGraph typedef graph_traits<BGLGraph>::vertex_descriptor BGLVertexDescriptor; with VertexList=listS, two vertex properties (distance map and a bundled property VertexContainer) and a bundled edge property cPose.
Now I try to create a predecessor map with the predecessor_recorder but I'm not able to create a map that obtains the predecessor informations. I know I can't use std::vector<BGLVertexDescriptor> like the example ( http://www.boost.org/doc/libs/1_35_0/libs/graph/example/bfs.cpp) because I use VertexList=listS. HenceI tried std::map
but this leads to another compiler error.
The short answer is: don't use listS :)
For the long answer, it would be nice to know the compiler error, but you're
going about it the wrong way - in two ways. First, there ar two components
to building property maps - the source (frequently a container of some kind)
and the map. The source is responsible for implementing the mapping of
vertex (or edge) descriptor to data. The map implements the put() and get()
functions for the source. Just creating a map (as you've just done) is only
half the job. You need to create teh map.
typedef std::map
participants (2)
-
Andrew Sutton
-
trashing@gmx.net