struct

PF2d::ThreadedBinaryTree::Node(T)

Inherits Struct < Value < Object

Using a struct avoids costly allocation and garbage collection

Constructors

new(value : T, left_index : UInt16 | Nil = nil, right_index : UInt16 | Nil = nil, thread_index : UInt16 | Nil = nil)
Source

Instance methods

insert(values : Enumerable(Node(T)), new_value : T, compare : T, T -> Int32, on_collision : T, T -> T | Nil = nil, at : UInt16 = 0, pred_index : UInt16 | Nil = nil)
Source
left_index
Source
left_index=(left_index : UInt16 | Nil)
Source
leftmost(values : Enumerable(Node(T))) : Node(T)
Source
next(values : Enumerable(Node(T))) : Node(T) | Nil
Source
right_index
Source
right_index=(right_index : UInt16 | Nil)
Source
thread_index
Source
thread_index=(thread_index : UInt16 | Nil)
Source
value
Source
value=(value : T)
Source