Boost logo

Boost Users :

From: Max Schoebinger (m.schoebinger_at_[hidden])
Date: 2005-02-02 07:22:48


Hello,

I am trying to create a std::map<edge_descriptor, unsigned int>.
Unfortunaltely, there is no less operator defined for edge descriptors,
so i'd like to implement my own version based on a custom internal
property associated with the edge.

Is it possible to access an arbitrary property, solely based on an
edge_descriptor without having access to the graph object?

Here some pseudo-code:

struct compare_edge_descriptors
{
     bool operator()(edge_descriptor e1, edge_descriptor e2)
     {
         unsigned int val1 = get_property_somehow(e1.get_property(),
my_custom_property);
         unsigned int val2 = get_property_somehow(e2.get_property(),
my_custom_property);
         return (val1 < val2 );
     }
};

Do you have an idea how to implement "get_property_somehow"?

Thanks,

Max


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