Documentation ¶
Index ¶
- Constants
- func AreIdentical[T comparable](x, y []T) bool
- func BubbleSort[T constraints.Ordered](toSort []T)
- func CocktailShakerSort[T constraints.Ordered](toSort []T)
- func GetMergeSort[T constraints.Ordered](smallSorter func([]T)) func([]T)
- func HeapSort[T constraints.Ordered](toSort []T)
- func InsertionSort[T constraints.Ordered](toSort []T)
- func IsSorted[T constraints.Ordered](ary []T) bool
- func QuickSort[T constraints.Ordered](toSort []T)
- func SelectionSort[T constraints.Ordered](toSort []T)
- func SwapValues[T any](ary []T, x, y int)
- type Heap
- type HeapNode
Constants ¶
View Source
const ( RootIndex int = 1 Down int = 0 Up int = 1 )
Variables ¶
This section is empty.
Functions ¶
func AreIdentical ¶
func AreIdentical[T comparable](x, y []T) bool
func BubbleSort ¶
func BubbleSort[T constraints.Ordered](toSort []T)
func CocktailShakerSort ¶
func CocktailShakerSort[T constraints.Ordered](toSort []T)
func GetMergeSort ¶
func GetMergeSort[T constraints.Ordered](smallSorter func([]T)) func([]T)
func HeapSort ¶
func HeapSort[T constraints.Ordered](toSort []T)
func InsertionSort ¶
func InsertionSort[T constraints.Ordered](toSort []T)
func IsSorted ¶
func IsSorted[T constraints.Ordered](ary []T) bool
func QuickSort ¶
func QuickSort[T constraints.Ordered](toSort []T)
func SelectionSort ¶
func SelectionSort[T constraints.Ordered](toSort []T)
func SwapValues ¶
Types ¶
type Heap ¶
type Heap[T constraints.Ordered] struct { // contains filtered or unexported fields }
type HeapNode ¶
type HeapNode[T constraints.Ordered] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.