package
0.0.0-20171011075504-07f7db3ea99f
Repository: https://github.com/mattn/go.git
Documentation: pkg.go.dev
# Functions
Float64s sorts a slice of float64s in increasing order (not-a-number values are treated as less than other values).
Float64sAreSorted tests whether a slice of float64s is sorted in increasing order (not-a-number values are treated as less than other values).
Ints sorts a slice of ints in increasing order.
IntsAreSorted tests whether a slice of ints is sorted in increasing order.
IsSorted reports whether data is sorted.
Reverse returns the reverse order for data.
Search uses binary search to find and return the smallest index i in [0, n) at which f(i) is true, assuming that on the range [0, n), f(i) == true implies f(i+1) == true.
SearchFloat64s searches for x in a sorted slice of float64s and returns the index as specified by Search.
SearchInts searches for x in a sorted slice of ints and returns the index as specified by Search.
SearchStrings searches for x in a sorted slice of strings and returns the index as specified by Search.
Slice sorts the provided slice given the provided less function.
SliceIsSorted tests whether a slice is sorted.
SliceStable sorts the provided slice given the provided less function while keeping the original order of equal elements.
Sort sorts data.
Stable sorts data while keeping the original order of equal elements.
Strings sorts a slice of strings in increasing order.
StringsAreSorted tests whether a slice of strings is sorted in increasing order.
# Interfaces
A type, typically a collection, that satisfies sort.Interface can be sorted by the routines in this package.
# Type aliases
Float64Slice attaches the methods of Interface to []float64, sorting in increasing order (not-a-number values are treated as less than other values).
IntSlice attaches the methods of Interface to []int, sorting in increasing order.
StringSlice attaches the methods of Interface to []string, sorting in increasing order.