
-------- Original-Nachricht --------
Datum: Wed, 12 Nov 2008 08:33:08 -0500 Von: "Andrew Sutton" <andrew.n.sutton@gmail.com> 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<BGLGraph, VertexID VertexContainer::*>::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. greetz, Manuel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer