|
Boost Users : |
Subject: Re: [Boost-users] heterogeneous tree container
From: Mauricio Gomes (mgpensar_at_[hidden])
Date: 2010-07-08 19:13:03
> Any reusable container out there for this purpose, or is ntree reusable
> somehow?
Maybe you could use Boost.Any in the tree.
Best regards,
Mau.
2010/7/8 Hicham Mouline <hicham_at_[hidden]>:
> Hello,
>
>
>
> 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.
>
>
>
>
>
>
> Regards,
>
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- Mau
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net