Boost logo

Boost Users :

From: Jeremy Graham Siek (jsiek_at_[hidden])
Date: 2005-03-15 08:53:41


Hi Brent,

It is hard to see the motivation by staring at adjacency_list. Instead,
consider
the graph algorithms and the idea that they should work with many
different
kinds of graph data structures. The design of the graph concepts (such
as IncidenceGraph, etc) were motivated by this, and then adjacency_list
was merely created as a class that fulfills these interfaces.

There is indeed some added complexity and indirection in the BGL
interfaces, a price to pay for the genericity. It's a tradeoff.

On Mar 14, 2005, at 6:16 PM, Arias Brent-P96059 wrote:
>
> Keep in mind I'm a newbie to the Graph lib, but my answer is that I'd
> just dispense with the descriptors, and absorb the functionality
> straight into the iterators. So, for example, a call to
>
> source(e, g)
>
> ...would have 'e' refer to an edge iterator rather than an edge
> descripter. I could guess why that approach wasn't taken, but if you
> happen to know - please do tell. :)

There are several kinds of edge iterators... in_edge_iterator,
out_edge_iterator, edge_iterator.
Which one would you use? Also, if you got rid of edge descriptors, then
the property
maps would have to work directly with edge iterators. Instead of
working with a single
edge descriptor, they would have to work with several edge iterators.
Edge descriptors
really are the abstract for this.

Cheers,
Jeremy
_______________________________________________
Jeremy Siek <jsiek_at_[hidden]>
http://www.osl.iu.edu/~jsiek
Ph.D. Candidate, Indiana University Bloomington
C++ Booster (http://www.boost.org)
_______________________________________________


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