ocean.util.container.ebtree.EBTree32

Elastic binary tree class

Fast 32-bit value binary tree class based on the ebtree library from HAProxy.

You need to have the library installed and link with -lebtree.

Usage example:

import ocean.util.container.ebtree.EBTree64;

// Create a tree
auto tree = new EBTree32!();

// Add some values to the tree
for ( uint i; i < 100; i++ )
{
    tree.add(i);
}

// Get the lowest value in the tree
auto lowest = tree.first;

// Get the highest value in the tree
auto lowest = tree.last;

// Iterate over all nodes in the key whose values are <= 50
foreach ( node; tree.lessEqual(50) )
{
    // node value is node.key
}

// Empty the tree
tree.clear;

Public Imports

ocean.util.container.ebtree.c.eb32tree
public import ocean.util.container.ebtree.c.eb32tree;
Undocumented in source.

Members

Classes

EBTree32
class EBTree32(bool signed = false)

EBTree32 class template.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).