sort

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Element added in v1.0.5

func Element(data sort.Interface, n int)

Element finds the nth rank ordered element and ensures it is at the nth position.

func HeapSort

func HeapSort(data sort.Interface)

heapSort implement heap sorting of all elements in data

func IsPartialSorted

func IsPartialSorted(data sort.Interface, m int) bool

func PartialSort

func PartialSort(data sort.Interface, m int)

Rearranges elements such that the range [0, m) contains the sorted m smallest elements in the range [first, data.Len). The order of equal elements is not guaranteed to be preserved. The order of the remaining elements in the range [m, data.Len) is unspecified.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL