I am trying to define a graph with undirected edges from a set of pair(int,int) edges (where each int represents a vertex index). Each such edge has an index of its own.
The catch is that I want that the internal vertex index of the graph will be consistent with the original vertex indexes. I also like to be able to extract the original edge index from an edge descriptor.
From http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/using_property_maps.html (Exterior Properties section) I understand that I should use the following graph type:
typedef adjacency_list<vecS, vecS, udirectedS,
no_property, property<edge_index_t, std::size_t> > Graph;
Unfortunately there's no explanation on how to use edge_index_t property.
It's clear that I could just use a map(pair(int,int),int) but I'm looking for a more elegant boost oriented solution.
Thank you, Kiril