Boost logo

Boost Users :

Subject: [Boost-users] heterogeneous tree container
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-07-08 18:46:21



I have need for a heterogeneous tree container that holds different types
(all of them primitive, int, double...) except for the leaf nodes which
would hold a POD.


The depth of the tree is N, known at runtime, and constant through all the
paths, the actual types of each node are only known at runtime as well.

Each level holds the same type. The number of children at 1 level, is
variable from 1 parent to the next.


 root (no data here)

| | |

type1 type1 type1

| |

type2 type2


typeN typeN .... typeN



There are no paths from root to leaf with a depth different from N.

typeN is a struct containing only primitive types, known a compile-time, and
instances of it are the result of calling a complex function with arguments
of type1.... type_N-1.

Note that I will generate the [1, N-1] part of the tree sequentially, but
then call the complex function in parallel.


I have looked at the ntree.hh but it seems to be a homogenous container.


Any reusable container out there for this purpose, or is ntree reusable





Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at