ocean.util.container.ebtree.EBTree64

Elastic binary tree class

Fast 64-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 EBTree64!();

// 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.eb64tree
public import ocean.util.container.ebtree.c.eb64tree;
Undocumented in source.

Members

Classes

EBTree64
class EBTree64(bool signed = false)

EBTree64 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).