TTree

Implements a binary search tree with multiple items per tree node.

T-tree Nodes are (by default) sized to fit within a 64-byte cache line. The number of items stored per node can be read from the nodeCapacity field. Each node has 0, 1, or 2 children. Each node has between 1 and nodeCapacity items, or it has nodeCapacity items and 0 or more children.

Disabled Default Constructor

A disabled default is present on this object. To use it, use one of the other constructors or a factory function.

Constructors

this
this(Allocator allocator)

Use allocator to allocate and free nodes in the tree.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

Copying this object is disabled.

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

contains
bool contains(T value)
empty
bool empty()
equalRange
auto equalRange(inout T value)
insert
bool insert(T value)
bool insert(R r)
bool insert(T[] values)

Inserts the given value into the tree.

length
size_t length()
lowerBound
auto lowerBound(inout T value)
opOpAssign
void opOpAssign(T value)

tree ~= item operator overload.

range
auto range()
remove
bool remove(T value, void delegate(T) cleanup = null)

Removes a value from the tree.

upperBound
auto upperBound(inout T value)

Structs

Range
struct Range(ThisT)

Tree range

See Also

Meta