8 Aug
2005
8 Aug
'05
5:14 p.m.
Hello there, I was trying to create hash_maps with vertex_descriptors and edge_descriptors. The first one was easy with vertex_descriptors being just void*'s, and there is even an example in the boost detail namespace (although it's not activated using gcc): template <> struct hash< void* > { std::size_t operator()(void* v) const { return (std::size_t)v; } } But the edge_descriptors give me some serious headache. How could I create a hash function for them? Is using the source and target a good idea in graphs where there could easily be more than one edge between two vertices? Or is there a great method I cannot come up with? I hope that somebody can help me out here :) Thanks, Wolfram Koska