Subject: Re: [boost] Review managers wanted for augmented data structures
From: Martin Knoblauch Revuelta (mkrevuelta_at_[hidden])
Date: 2013-03-02 09:21:35
On Wed, Feb 27, 2013 at 1:08 AM, Vadim Stadnik <vadimstdk_at_[hidden]> wrote:
> Hi all,
> At present, neither Boost library nor STL provides containers using
> augmented data structures. I suggest that the Boost community consider
> solving the challenging problem how to extend STL by integrating advanced
> data structures.
> Augmented red-black trees could have been included in the very first
> version of STL.
> Why is it difficult and has not been done yet?
> The major obstacle for the integration is the C++ standard specification of
> computational complexities of single operations for containers and
I totally agree.
> There are two libraries in the Boost review schedule:
> "STL Extensions" and "Countertree". None of them has as yet a review
> manager. The order of the reviews may not be significant. It is more
> important that at least one library pass the review. This would help
> integrating other advanced data structures.
> Are there Boost experts who could volunteer to take responsibility of
> review manager for any of these two libraries?
I really hope that some expert jumps in.
In the meantime, I would like to point out some previous proposals of
similar containers (including mine):
2004 (The oldest mention I could find. I don't know if it got
2006: "Hierarchical Data Structures"
2006: "AVL Array" (terrible name, I know)
Renamed as "Rank List" after some debate when proposed for Boost:
This last version is probably outdated with respect to "AVL Array".
I think that there are very interesting ideas in some of them.
The "Hierarchical Data Structures" proposed "cursors" in addition to
the ordinary iterators, to let the user traverse the tree at will
---not necessarily in-order---. In my proposal (AVL Array / Rank
List), I decided to hide the internal structure of the tree, offering
only iterators. As a result, I had to offer some additional methods,
like a binary search (provided that the sequence is sorted). Later I
found myself hacking into the tree structure to make some other
I proposed augmenting the tree with an integer counting nodes in each
subtree ---like all others--- but I also proposed augmenting the tree
with a user-defined type. In the normal view of a sequence, every
element occupies a unit of space. In what I called "Non-Proportional
Sequence View" the user can decide the "virtual space" occupied by
every element, and then jump to any position in that "virtual scale"
in O(log N) time.
I made some design decisions favouring functionality and low
computational complexity over space. Every node contained pointers to
the next and previous nodes in-order. Between this and the NPSV, they
used a lot of space. At some point I increased their size even
further, and the shocking result was that my experiments run faster.
This leads me to think that a specific allocator ---like the one
proposed in Countertree--- might help a lot.
I also played with this concept of sequence ---with O(log N) random
access and O(log N) insertion/removal--- in permanent storage. See
"Shiftable Files" in the project "AVL Array". It is a toy
implementation, but it works.
I will love to discuss these ideas if anybody is interested. I would
have said all this before, but I was disconnected from the Boost list
for a long while and I didn't know that augmented trees had been
proposed again. Sorry.
Martín Knoblauch Revuelta
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk