FiniteLinearAggregateSort(S, V)ΒΆ

defaults.spad line 56 [edit on github]

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 function f using the heapsort algorithm.

quickSort: ((S, S) -> Boolean, V) -> V

quickSort(f, agg) sorts the aggregate agg with the ordering function f using the quicksort algorithm.

shellSort: ((S, S) -> Boolean, V) -> V

shellSort(f, agg) sorts the aggregate agg with the ordering function f using the shellSort algorithm.