Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-02-22 17:52:43


"Fredrik Blomqvist" <fredrik_blomqvist_at_[hidden]> wrote in message
news:cvfhbf$n4i$1_at_sea.gmane.org...
|I haven't studied your proposal in detail yet, but - I think it would be
| valuable
| for further discussion if you could compare your tree implementation to
| Kasper Peeter's version: http://www.damtp.cam.ac.uk/user/kp229/tree/

looks nice.

| Kasper did propose his tree to Boost in late 2002:
| http://lists.boost.org/MailArchives/boost/msg36876.php
| .. altough it didn't seem to gain momentum at the time.

well, it does show there is great interest in tree containers.

| I've been using Kasper's tree in a couple of smaller personal projects and
| would
| very much like to see a good generic n-ary tree container in Boost.

yeah, I guess a reasonble tree container library would start of with

namepace boost
{

    template< class T, class Container = std::vector<T> >
    class tree;

    template< int N, class T, class Container = std::vector<T> >
    class n_ary_tree;
}

the possibility that we can specify the underlying container is important.
Given that, we
can easily make a tree of heap-allocated objects by

typedef boost::tree<T*, boost::ptr_vector<T> > heap_tree;

br

Thorsten


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