module Algorithmable::DataStructs

Public Instance Methods

new_bag() click to toggle source
# File lib/algorithmable/data_structs.rb, line 15
def new_bag
  Bag.new
end
new_deque_queue() click to toggle source
# File lib/algorithmable/data_structs.rb, line 27
def new_deque_queue
  Deque.new
end
new_fifo_queue() click to toggle source
# File lib/algorithmable/data_structs.rb, line 19
def new_fifo_queue
  Queue.new
end
new_lifo_queue() click to toggle source
# File lib/algorithmable/data_structs.rb, line 23
def new_lifo_queue
  Stack.new
end
new_max_priority_queue(collection = []) click to toggle source
# File lib/algorithmable/data_structs.rb, line 39
def new_max_priority_queue(collection = [])
  Heap::Max.new(collection)
end
new_min_priority_queue(collection = []) click to toggle source
# File lib/algorithmable/data_structs.rb, line 43
def new_min_priority_queue(collection = [])
  Heap::Min.new(collection)
end
new_ordered_symbol_table(key_type, value_type) click to toggle source
# File lib/algorithmable/data_structs.rb, line 31
def new_ordered_symbol_table(key_type, value_type)
  OrderedSymbolTable.new(key_type, value_type)
end
new_priority_queue(collection, &block) click to toggle source
# File lib/algorithmable/data_structs.rb, line 35
def new_priority_queue(collection, &block)
  Heap::Max.new(collection, &block)
end