class

RedBlack::Tree(V)

Inherits Enumerable < Reference < Object

Constructors

Instance methods

<<(v : V)
Source
collect
Source
depth(x : Node(V) | Leaf)
Source
display(io : IO, h)
Source
display
Source
each

Must yield this collection's elements to the block.

Source
each_node
Source
each_node_with_index
Source
empty!
Source
empty?

Returns true if self does not contain any element.

([] of Int32).empty? # => true
([1]).empty?         # => false
[nil, false].empty?  # => false
  • #present? returns the inverse.
Source
enum
Source
find(key : V)
Source
find!(key : V)
Source
find?(key : V)
Source
height(x : Node(V) | Leaf)
Source
insert(v : V)
Source
max_node
Source
max_node!
Source
max_node?
Source
min_node
Source
min_node!
Source
min_node?
Source
pred(x : Node(V))
Source
pred!(x : Node(V))
Source
pred?(x : Node(V))
Source
size

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4
Source
succ(x : Node(V))
Source
succ!(x : Node(V))
Source
succ?(x : Node(V))
Source
to_s(io)
Source