|
Boost : |
Subject: Re: [boost] [tree] associative containers
From: Erik Erlandson (eje_at_[hidden])
Date: 2011-11-02 18:58:13
On Tue, 2011-11-01 at 12:15 -0700, Cromwell Enage wrote:
> I've been studying the tree proposal to see how I could write adaptors in my tree_node library (now at version 0.2 in the sandbox) that conform to the current concepts.
> Is there anything in the proposal that is analogous to a PairAssociativeContainer? My tree_node library defines an AssociativeTreeNode concept and a couple of models that I've found to be useful, e.g. for implementing decision tree learning algorithms.
>
My reading of the hierarchical container draft is that associative
container functionalities (and other varieties of container interfaces)
actually live in the cursor:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2101.html#tr.cursors
I'm not entirely sure about the relative merits of that versus defining
a parallel zoology of Hierarchical Containers that is basically
isomorphic to the traditional Container hierarchy, and leaving the
cursor definition more lightweight: perhaps just "iterator plus
parent(), begin() and end()", or alternatively not having a separate
cursor type, and simply having traditional iterators over children at
any given node.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk