Module: Algorithmable::Sort

Defined in:
lib/algorithmable/sort.rb,
lib/algorithmable/sort/merge.rb,
lib/algorithmable/sort/shell.rb,
lib/algorithmable/sort/utils.rb,
lib/algorithmable/sort/bubble.rb,
lib/algorithmable/sort/shuffle.rb,
lib/algorithmable/sort/insertion.rb,
lib/algorithmable/sort/selection.rb,
lib/algorithmable/sort/quick_sort.rb,
lib/algorithmable/sort/binary_heap.rb

Defined Under Namespace

Modules: Utils Classes: Shell, Shuffle

Class Method Summary collapse

Class Method Details

.binary_heap(collection) ⇒ Object


28
29
30
# File 'lib/algorithmable/sort.rb', line 28

def binary_heap(collection)
  BinaryHeap.sort(collection)
end

.bubble(collection) ⇒ Object


24
25
26
# File 'lib/algorithmable/sort.rb', line 24

def bubble(collection)
  Bubble.sort(collection)
end

.insertion(collection) ⇒ Object


36
37
38
# File 'lib/algorithmable/sort.rb', line 36

def insertion(collection)
  Insertion.sort(collection)
end

.merge(collection) ⇒ Object


20
21
22
# File 'lib/algorithmable/sort.rb', line 20

def merge(collection)
  Merge.sort(collection)
end

.quick(collection) ⇒ Object


16
17
18
# File 'lib/algorithmable/sort.rb', line 16

def quick(collection)
  QuickSort.sort(collection)
end

.selection(container) ⇒ Object


32
33
34
# File 'lib/algorithmable/sort.rb', line 32

def selection(container)
  Selection.sort(container)
end

.shell(collection) ⇒ Object


40
41
42
# File 'lib/algorithmable/sort.rb', line 40

def shell(collection)
  Shell.sort(collection)
end

.shuffle(collection) ⇒ Object


44
45
46
# File 'lib/algorithmable/sort.rb', line 44

def shuffle(collection)
  Shuffle.sort(collection)
end