FiniteLinearAggregateSort(S, V)ΒΆ
defaults.spad line 56 [edit on github]
S: Type
V: Join(FiniteLinearAggregate S, shallowlyMutable)
This package exports 3 sorting algorithms which work over FiniteLinearAggregates.
- heapSort: ((S, S) -> Boolean, V) -> V
heapSort(f, agg)
sorts the aggregate agg with the ordering functionf
using the heapsort algorithm.
- quickSort: ((S, S) -> Boolean, V) -> V
quickSort(f, agg)
sorts the aggregate agg with the ordering functionf
using the quicksort algorithm.
- shellSort: ((S, S) -> Boolean, V) -> V
shellSort(f, agg)
sorts the aggregate agg with the ordering functionf
using the shellSort algorithm.