Documentation
¶
Overview ¶
sort is copied from stdlib, most functions made public to support generic sorters.
Index ¶
- func DoPivot(data LessSwap, lo, hi int) (midlo, midhi int)
- func HeapSort(data LessSwap, a, b int)
- func InsertionSort(data LessSwap, a, b int)
- func MaxDepth(n int) int
- func MedianOfThree(data LessSwap, m1, m0, m2 int)
- func QuickSort(data LessSwap, a, b, maxDepth int)
- func Rotate(data LessSwap, a, m, b int)
- func SiftDown(data LessSwap, lo, hi, first int)
- func Stable(data LessSwap, n int)
- func SwapRange(data LessSwap, a, b, n int)
- func SymMergeFunc(data LessSwap, a, m, b int)
- type LessSwap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertionSort ¶
Auto-generated variant of sort.go:insertionSort
func MaxDepth ¶
MaxDepth returns a threshold at which quicksort should switch to heapsort. It returns 2*ceil(lg(n+1)).
func MedianOfThree ¶
Auto-generated variant of sort.go:medianOfThree
func SymMergeFunc ¶
Auto-generated variant of sort.go:symMerge
Types ¶
Click to show internal directories.
Click to hide internal directories.