Module: Lite::Containers::AvlTree::Implementation
- Defined in:
- lib/lite/containers/avl_tree/implementation.rb
Defined Under Namespace
Class Method Summary collapse
Methods included from Traversal
#after_back_guard?, #before_front_guard?, #reverse_traverse, #traverse
Methods included from Find
#leftmost_child, #rightmost_child
Methods included from Insert
Methods included from Delete
Methods included from Balance
#balance_factor, #height, #rebalance, #rotate_left, #rotate_left_right, #rotate_right, #rotate_right_left, #update_height
Class Method Details
.instance(type) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/lite/containers/avl_tree/implementation.rb', line 17 def self.instance(type) type = type.to_sym case type when :max then Max when :min then Min else raise Error, Error, "Unexpected AVL tree type: '#{type}'" end end |