Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] getting an edge_descriptor of a reverse_graph
From: Alex Hagen-Zanker (ahh34_at_[hidden])
Date: 2012-01-03 06:23:37


On 23/12/2011 14:44, Jeremiah Willcock wrote:
> On Thu, 22 Dec 2011, Alex Hagen-Zanker wrote:
>> I hope I am right in using detail::reverse_graph_edge_property_map as
>> a reversed edge wrapper around my existing edge_property_maps. For
>> use with some property maps it did require me to add a default
>> constructor and const reference operator[](key) const {} though.
> The reverse_graph_edge_property_map class is in fact internal; see the
> documentation for how to get that map in an "official" way.

Could you maybe point me to the right place in the documentation?

I have a function that has a graph and a property map(with edge
descriptors as keys) as arguments. Depending on a third argument it
either acts on the graph or the reverse graph:

template<typename G, typename E>
void foo(G& graph, E edgemap, bool doReverse) {
     if(doReverse)
         return foo( make_reverse_graph(graph),
make_reverse_map(edgemap), false);
     else
        // do something with graph and edgemap
}

For make_reverse_map I now use detail::reverse_graph_edge_property_map
and I would be happy to use an "official" equivalent.

Thanks, Alex


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