struct PF2d::ThreadedBinaryTree::Node(T)

Overview

Using a struct avoids costly allocation and garbage collection

Defined in:

pf2d/threaded_binary_tree.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : T, left_index : UInt16 | Nil = nil, right_index : UInt16 | Nil = nil, thread_index : UInt16 | Nil = nil) #

[View source]

Instance Method Detail

def 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) #

[View source]
def left_index : UInt16 | Nil #

[View source]
def left_index=(left_index : UInt16 | Nil) #

[View source]
def leftmost(values : Enumerable(Node(T))) : Node(T) #

[View source]
def next(values : Enumerable(Node(T))) : Node(T) | Nil #

[View source]
def right_index : UInt16 | Nil #

[View source]
def right_index=(right_index : UInt16 | Nil) #

[View source]
def thread_index : UInt16 | Nil #

[View source]
def thread_index=(thread_index : UInt16 | Nil) #

[View source]
def value : T #

[View source]
def value=(value : T) #

[View source]