class RedBlack::Tree(V)
- RedBlack::Tree(V)
- Reference
- Object
Included Modules
- Enumerable(V)
Defined in:
rb_tree.crConstructors
Instance Method Summary
- #<<(v : V)
- #collect
- #depth(x : Node(V) | Leaf)
- #display(io : IO, h)
- #display
-
#each(&)
Must yield this collection's elements to the block.
- #each_node(&)
- #each_node_with_index(&)
- #empty!
-
#empty?
Returns
true
ifself
is empty,false
otherwise. - #enum(&)
- #find(key : V)
- #find!(key : V)
- #find?(key : V)
- #height(x : Node(V) | Leaf)
- #insert(v : V)
- #max_node
- #max_node!
- #max_node?
- #min_node
- #min_node!
- #min_node?
- #pred(x : Node(V))
- #pred!(x : Node(V))
- #pred?(x : Node(V))
-
#size
Returns the number of elements in the collection.
- #succ(x : Node(V))
- #succ!(x : Node(V))
- #succ?(x : Node(V))
- #to_s(io)
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(V)
Must yield this collection's elements to the block.
def empty?
#
Description copied from module Enumerable(V)
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def size
#
Description copied from module Enumerable(V)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4