I am currently trying to define external properties of a boost graph. I use some bundled properties as internal ones:
struct VertexProperties
{
int demand;
};
struct EdgeProperties
{
uint capacity;
int cost;
};
typedef adjacency_list <vecS, vecS, bidirectionalS, VertexProperties, EdgeProperties> Graph;
However, during the algorithm I need some external properties, that is I want to be able to map edges/vertices of my graph to elements stored in a std::vector in such a way that I can access them via operator[] (Edge e). I am standing in front of the boost documentation without a clue. It seems like I need a property_map, but I don't know how to use these together with vectors. The only examples that I found so far concern maps from vertices to a vector, but as the vertices are unsigned ints this is trivial.
I am really frustrated by boost so far, I think it would have saved me a lot of time to implement and test a graph class by myself, I really don get this crazy template metaprogramming stuff...