EBTree32

EBTree32 class template.

Constructors

this
this()

Constructor

this
this(INodePool node_pool)

Constructor

Members

Aliases

INodePool
alias INodePool = .INodePool!(Node)

Node pool interface type alias

Key
alias Key = int

Key type alias

Key
alias Key = uint
Undocumented in source.
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.

add
Node* add(Dual16Key key)

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

add
Node* add(Dual16Key key)

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

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.

update
Node* update(Node node, Dual16Key key)

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

Mixins

__anonymous
mixin Node!(eb32_node, Key, getKey, eb32_next, eb32_prev, eb32_prev_unique, eb32_next_unique, eb32_delete)

Node struct mixin. Elements of Node are stored in the tree. @see ocean.util.container.ebtree.model.KeylessMethods.

__anonymous
mixin Iterators!(Node)

Mixin of iterators. @see ocean.util.container.ebtree.model.KeylessMethods.

__anonymous
mixin KeylessMethods!(Node, eb32_first, eb32_last)

Mixin of methods. @see ocean.util.container.ebtree.model.KeylessMethods.

Static variables

signed_key
auto signed_key;

false if 'uint' is the key type or true if it is 'int'.

Structs

Dual16Key
struct Dual16Key

Dual32Key struct, allows the usage of two 32-bit integer values as a combined 64-bit key.

Mixed In Members

From mixin Node!(eb32_node, Key, getKey, eb32_next, eb32_prev, eb32_prev_unique, eb32_next_unique, eb32_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, eb32_first, eb32_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 'uint' as key type, true: use 'int'.

Meta