Boost logo

Boost :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-11-22 15:07:44


On Wed, 2006-11-22 at 20:30 +0100, Benoit wrote:
> Hello everyone,
>
> I have been using the BGL for quite some time with both directed and
> bidirectional graphs (with adjacency_list).
> Sometimes i need to use these graphs in algorithms as if they were
> undirected... AFAICT, this is currently not possible because
> out_edges() exists in all cases, but don't do the same... The obvious
> solution consists in writing a dedicated adapter used for translating
> a bidirectional graph into a directed one at least for out_edges(),
> and optionally for other stuff (internal properties, vertex and edge
> descriptors?) to make this subtle change as transparent as possible.
>
> Can you think of another way ? Is there already such an adapter
> somewhere (i have unsuccessfully tried to find one...) ? In case it
> didn't exist, would anyone else be interested to have one ?

I think this is the right way to handle the problem you describe. I do
not know of anyone who has implemented such an adapter, but it would be
a welcome addition to the BGL. If you do write this adapter, please
consider contributing it to the BGL!

  Cheers,
  Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk