|
Boost : |
From: Kasper Peeters (peekas_at_[hidden])
Date: 2002-10-11 03:06:56
> I have only briefly looked over the documentation. Are you using a
> quad-linked structure to avoid link allocations (i.e. the links are embedded
> in the nodes)?
Yes, the nodes are
template<class T>
struct tree_node_ {
tree_node_<T> *parent;
tree_node_<T> *first_child, *last_child;
tree_node_<T> *prev_sibling, *next_sibling;
T data;
};
For very small-size objects 'T' this is of course a lot of overhead,
and perhaps a singly linked list would be preferable in this case (I
guess this is one of the reasons why Herve wants the class to be
templated over the container class in which the children are stored,
right?).
Kasper
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk