class SSet::Treap(T)
- SSet::Treap(T)
- Reference
- Object
Included Modules
Defined in:
datastructure/sset/treap.crConstructors
Instance Method Summary
- #add?(key : T) : Bool
- #delete(key : T) : Bool
-
#inspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
- #root : SSet::Treap::Node(T)
-
#size : Int32
Returns the number of elements in the collection.
- #split(key : T) : Tuple(self, self)
-
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
Instance methods inherited from module BinaryTree(T, SSet::Treap::Node(T), SSet::Treap::NilNode(T))
<<(key : T) : self
<<,
add(key : T) : self
add,
add?(key : T) : Bool
add?,
clear : self
clear,
delete(key : T) : Bool
delete,
each(node : Node(T) = min_node)each(node : Node(T) = min_node, &) : Nil each, empty? : Bool empty?, ge(key : T) : T? ge, ge!(key : T) : T ge!, ge_node(key : T, x : Node(T) = root) : Node(T) ge_node, gt(key : T) : T? gt, gt!(key : T) : T gt!, gt_node(key : T, x : Node(T) = root) : Node(T) gt_node, includes?(key : T) : Bool includes?, le(key : T) : T? le, le!(key : T) : T le!, le_node(key : T, x : Node(T) = root) : Node(T) le_node, lt(key : T) : T? lt, lt!(key : T) : T lt!, lt_node(key : T, x : Node(T) = root) : Node(T) lt_node, max : T max, max? : T? max?, max_node : Node(T) max_node, min : T min, min? : T? min?, min_node : Node(T) min_node, reverse_each(node : Node(T) = max_node)
reverse_each(node : Node(T) = max_node, &) : Nil reverse_each, root root, rotate_left(x : Node(T)) : Nil rotate_left, rotate_right(x : Node(T)) : Nil rotate_right, search(key : T, x : Node(T) = root) : Node(T) search, size : Int32 size
Instance methods inherited from module Enumerable(T)
accumulate(init : U) : Array(U) forall Uaccumulate : Array(T)
accumulate(init : U, &block : U, T -> U) : Array(U) forall U
accumulate(&block : T, T -> T) : Array(T) accumulate, mex : T mex, mex_sorted : T mex_sorted, tally(*, default : Int32) : Hash(T, Int32) tally, unique : self
unique(&) : self unique
Constructor Detail
Instance Method Detail
def inspect(io : IO) : Nil
#
Description copied from class Reference
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
def size : Int32
#
Description copied from module Enumerable(T)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4
def to_s(io : IO) : Nil
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>