Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Having a cost function as weight map
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2009-12-18 12:51:39


Jeremiah Willcock wrote:
> Please tell me if there are any problems, as I have not
> tested this.

It seems to work. I had to do a little fix to your code though. In the
function_property_map you use 'value_type' which isn't defined and which
is, I believe :

typedef typename boost::property_traits<
                  function_property_map<Functor, Arg>
>::value_type
        value_type;

I also changed the functor type from 'Functor' to 'const Functor&'. It
seems to work. What was the rationale for copying it ?

My functor needs to have a pointer/reference to the graph to be able to
get the my_edge object from the edge_descriptor passed to the operator().

Thanks a lot!

-- 
Maxime

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