I am quite new to Boost graph. I am trying to adapt an example for finding Dijkstra Shortest Path algorithm which used VertexList = vecS. I changed the vertex container to L
If somebody is interested in the solution, Creating an associative_property_map as suggested in the previous answer solved the issue:
typedef std::mapIndexMap;
IndexMap mapIndex;
boost::associative_property_map propmapIndex(mapIndex);
//indexing the vertices
int i=0;
BGL_FORALL_VERTICES(v, g, pGraph)
{
boost::put(propmapIndex, v, i++);
}
Then pass this Vertex index map to the dijkstra_shortest_paths() call as a named parameter. PS: BGL_FORALL_VERTICES() is defined in < boost/graph/iteration/iteration_macros.hpp >