Boost logo

Boost :

From: hankel_o_fung_at_[hidden]
Date: 2001-02-05 22:12:32


--- In boost_at_y..., Jeremy Siek <jsiek_at_l...> wrote:
[snip]
> The AdjacencyGraph concept is a bit odd, it is somewhat frivolous
since
> IncidenceGraph really covers the same functionality (and more).
> AdjacencyGraph is there just because I can imagine situations where
> adjacent_vertices() would be more convenient to use than out_edges
(). One
> thing in favor of keeping AdjacencyGraph is that it is trivial to
> implement using the graph/detail/adjacency_iterator class. I should
> document this class and make it public.
>
You are right. Thanks for telling me about this class.

[snip]
> Also, the algorithms in BGL that require vertex traversal
> also require out-edge traversal, so it is convenient to group them
> together.
Hmmm, but the problem is, there are algorithms that require
traversal across all vertices and out-edge traversal but not
adjacent-vertex traversal. So one may have to define something
they don't need when using a BGL algorithm. A similar situation
occurs when one doesn't want to specialize the graph traits in
constructing a new graph class. For example, to construct a graph
class that models the VertexListGraph concept, one should at least
typedef in_edge_iterator as void. Although this is technically
simple and acceptable, it is still a penalty --- especially to
the uninitiated (like me).

Cheers,
Hankel


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