
13 May
2009
13 May
'09
11:47 a.m.
template
std::vector<int> translate_to_edges_index(const EdgePredecessorMap& em, const VertexPredecessorMap& vm, const EdgeIndexMap& im, VertexDescriptor dest) { std::vector<int> res; while(vm[dest] != dest) { res.push_back(im[em[dest]]); dest = vm[dest]; } return res; }
I would recommend using the get() and put() functions for property maps instead of operator[]. It allows a broader class of property maps to be used with the algorithm. Andrew Sutton andrew.n.sutton@gmail.com