Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 1999-12-10 23:42:02


So one special kind of graph is a tree, and I was thinking about
adding the root(v) function to accomodate graphs that are trees.
But I started thinking, maybe it would be better to just have
a separate tree interface altogether. Here's what it might
look like:

T is a tree type
ChIt is a children iterator
N is a node descriptor type

t is of type T
n is of type N

n = root(t)
pair<ChIt,ChIt> citp = children(n,t)
n = parent(n,t)

And one cool adaptor class would take a graph, root node, and parent
property accessor, and map it to the tree interface.

Cheers,

Jeremy

----------------------------------------------------------------------
 Jeremy Siek
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (650) 933-8724
 and cell phone: (415) 377-5814
 C++ Library & Compiler Group fax: (650) 932-0127
 SGI www: http://www.lsc.nd.edu/~jsiek/
----------------------------------------------------------------------


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