EBTree128

EBTree64 class template.

Constructors

this
this()

Constructor

this
this(INodePool node_pool)

Constructor

Members

Aliases

INodePool
alias INodePool = .INodePool!(Node)

Node pool interface type alias

opBinaryRight
alias opBinaryRight(string op : "in") = opIn_r

Support for the 'in' operator

Functions

add
Node* add(Key key)

Adds a new node to the tree, automatically inserting it in the correct location to keep the tree sorted.

clear
void clear()

Recycles the nodes back to the node pool and call the super class clear()

firstGreaterEqual
Node* firstGreaterEqual(Key key)

Searches the tree for the first node whose key is >= the specified key, and returns it.

firstLessEqual
Node* firstLessEqual(Key key)

Searches the tree for the first node whose key is <= the specified key, and returns it.

opIn_r
Node* opIn_r(Key key)

Searches the tree for the specified key, and returns the first node with that key.

update
Node* update(Node node, Key key)

Sets the key of node to key, keeping the tree sorted.

Mixins

__anonymous
mixin Node!(eb128_node, Key, getKey, eb128_next, eb128_prev, eb128_prev_unique, eb128_next_unique, eb128_delete)

Node struct, Node instances are stored in the ebtree.

__anonymous
mixin Iterators!(Node)
Undocumented in source.
__anonymous
mixin KeylessMethods!(Node, eb128_first, eb128_last)
Undocumented in source.

Static variables

signed_key
auto signed_key;

false if the 'ucent' surrogate is the key type or true if 'cent'.

Structs

Key
struct Key

Key struct, acts as a 'ucent'/'cent' surrogate, using two 64-bit integer values as a combined 128-bit key.

Mixed In Members

From mixin Node!(eb128_node, Key, getKey, eb128_next, eb128_prev, eb128_prev_unique, eb128_next_unique, eb128_delete)

key
Key key()

Obtains the key of this node.

next
typeof(&this) next()

Obtains the next node in the tree to which this node is associated.

prev
typeof(&this) prev()

Obtains the previous node in the tree to which this node is associated.

next_unique
typeof(&this) next_unique()

Obtains the next node in the tree to which this node is associated, skipping key duplicates.

prev_unique
typeof(&this) prev_unique()

Obtains the previous node in the tree to which this node is associated, skipping key duplicates.

From mixin Iterators!(Node)

Iterator
class Iterator

Provides 'foreach' and 'foreach_reverse' iteration over the nodes in the tree, starting with the first or last node, respectively.

PartIterator
class PartIterator

Provides 'foreach' and 'foreach_reverse' iteration over the nodes in the tree, starting with the first node whose key is greater or less than a reference key, respectively.

From mixin KeylessMethods!(Node, eb128_first, eb128_last)

remove
void remove(Node node)

Removes a node from the tree.

first
Node* first()
last
Node* last()
opApply
int opApply(int delegate(ref Node node) dg)

foreach iterator over nodes in the tree. Any tree modification is permitted during iteration.

opApply_reverse
int opApply_reverse(int delegate(ref Node node) dg)

foreach_reverse iterator over nodes in the tree. Any tree modification is permitted during iteration.

Inherited Members

From IEBTree

root
eb_root root;

Tree root node.

length
size_t length()
clear
void clear()

Removes all values from the tree.

increaseNodeCount
size_t increaseNodeCount(size_t n)

Increases the record counter by n.

decreaseNodeCount
size_t decreaseNodeCount(size_t n)

Decreases the record counter by n.

Parameters

signed

false: use the 'ucent' surrogate as key type, true: 'cent'.

Meta