|
Boost Users : |
From: Wolfram Koska (koskaw_at_[hidden])
Date: 2005-08-08 12:14:49
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net