Boost logo

Boost Users :

From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2004-03-31 14:46:19


Jeremy,

On Wed, 31 Mar 2004, Jeremy Siek wrote:
> On Mar 31, 2004, at 1:52 PM, Douglas Paul Gregor wrote:
> > The only thing I've ever found complex in the BGL is actually forming a
> > graph type out of adjacency_list. Every single time I need a graph I
> > have
> > to read through the adjacency_list documentation to figure out what to
> > do,
> > although often I just copy the typedef from somewhere else. Simplified
> > graph adaptors could really help here.
>
> Right. In particular, the way internal properties are dealt with is
> rather
> cumbersome.

Actually, I'm guessing that was part of the suggested "digraph" adaptor:
that vertices implicitly have names of a particular type and that a name
can be directly mapped to a vertex by the adaptor. About 3/4 of the time I
have a BGL graph (and I have a LOT of BGL graphs <g>) I also have a
map<name_type, vertex_descriptor>., so I'm continually shuffling vertex
names and edges. Smoothing over that could help a bit.

> Looks neat. How would that be implemented? I hope it doesn't require
> storing something in the graph object itself that keeps track of
> the progress of the iteration.

Uh-oh. I had an implementation in mind, but now I see that it was flawed.
I'll just go sit in the corner now.

> BTW, for those who like macros, there's
> boost/graph/iteration_macros.hpp.

Ah, the BGL is full of wonders!

        Doug


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