Re: [Boost-users] [graph] predecessor_recorder and VertexList=listS
Hello Andrew,
thank you for your suggestions. Unfortunately I still have compile problems. I tried both ways, indexing by bundled properties and by using an external map.
Inside the call of breadth_first_search(...) both ways end with the same compiler error (partially in german) :
boost_1_35_0\boost\graph\visitors.hpp(160): error C2664: 'void put
thank you for your suggestions. Unfortunately I still have compile problems. I tried both ways, indexing by bundled properties and by using an external map.
Inside the call of breadth_first_search(...) both ways end with the same compiler error (partially in german) :
It's hard to say what's going on without seeing the actual call to BFS - although the errors are a little odd. I'm not sure why, for example, some of the top-level template parameters seem to be allocators. It looks like you might not be creating a property map from the predecessor vector, causing the compiler to choose the wrong template. How are you calling BFS? -- Andrew Sutton andrew.n.sutton@gmail.com
-------- Original-Nachricht --------
Datum: Wed, 12 Nov 2008 08:33:08 -0500 Von: "Andrew Sutton"
An: boost-users@lists.boost.org Betreff: Re: [Boost-users] [graph] predecessor_recorder and VertexList=listS
thank you for your suggestions. Unfortunately I still have compile problems. I tried both ways, indexing by bundled properties and by using
an
external map.
Inside the call of breadth_first_search(...) both ways end with the same compiler error (partially in german) :
It's hard to say what's going on without seeing the actual call to BFS - although the errors are a little odd. I'm not sure why, for example, some of the top-level template parameters seem to be allocators. It looks like you might not be creating a property map from the predecessor vector, causing the compiler to choose the wrong template.
How are you calling BFS?
Oh, sorry! I've forgotten to post the call. Following is the call and the instanziation of the map (With VertexList=vecS this will work):
// Get the index map
typedef property_map
Oh, sorry! I've forgotten to post the call. Following is the call and the instanziation of the map (With VertexList=vecS this will work):
// Get the index map typedef property_map
::type IndexMap; IndexMap im = get(&VertexContainer::m_idVertex, graphIn); // Create a predecessor map over the indices. BGLVertexDescriptor startDescriptor; idMapperIn.mapIDs(this->getStartID(), startDescriptor); std::vector<BGLVertexDescriptor> p(num_vertices(graphIn)); p[this->getStartID()] = startDescriptor;
breadth_first_search( graphIn , startDescriptor , vertex_index_map(im).visitor(make_bfs_visitor(record_predecessors(&p[0], boost::on_tree_edge()))) );
idMapperIn is a local class to map IDs to a valid vertex descriptor.
I have no idea... It still looks like the compiler is picking the wrong template. What compiler are you using? Can you upgrade to a new version of Boost? Andrew Sutton andrew.n.sutton@gmail.com
-------- Original-Nachricht --------
Datum: Wed, 12 Nov 2008 09:08:22 -0500 Von: "Andrew Sutton"
An: boost-users@lists.boost.org Betreff: Re: [Boost-users] [graph] predecessor_recorder and VertexList=listS
Oh, sorry! I've forgotten to post the call. Following is the call and
the
instanziation of the map (With VertexList=vecS this will work):
// Get the index map typedef property_map
::type IndexMap; IndexMap im = get(&VertexContainer::m_idVertex, graphIn); // Create a predecessor map over the indices. BGLVertexDescriptor startDescriptor; idMapperIn.mapIDs(this->getStartID(), startDescriptor); std::vector<BGLVertexDescriptor> p(num_vertices(graphIn)); p[this->getStartID()] = startDescriptor;
breadth_first_search( graphIn , startDescriptor , vertex_index_map(im).visitor(make_bfs_visitor(record_predecessors(&p[0], boost::on_tree_edge()))) );
idMapperIn is a local class to map IDs to a valid vertex descriptor.
I have no idea... It still looks like the compiler is picking the wrong template. What compiler are you using?
I'm using MS VisualStudio 7.1
Can you upgrade to a new version of Boost?
Unfortunatly not at the moment. I think it's not necessary, because since 1.35 no update for boost::graph was published, I think. But I can give it a try in the next days. greetz, Manuel -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
participants (2)
-
Andrew Sutton
-
M. Siebeneicher