Documentation ¶
Index ¶
- func ParallelSort(S sort.Interface, T ...Swapper)
- func ParallelStable(S sort.Interface, T ...Swapper)
- func SearchInt16s(a []int16, x int16) int
- func SearchInt32s(a []int32, x int32) int
- func SearchInt64s(a []int64, x int64) int
- func SearchInt8s(a []int8, x int8) int
- func SearchInts(a []int, x int) int
- func SearchUint16s(a []uint16, x uint16) int
- func SearchUint32s(a []uint32, x uint32) int
- func SearchUint64s(a []uint64, x uint64) int
- func SearchUint8s(a []uint8, x uint8) int
- func SearchUints(a []uint, x uint) int
- type Float64Slice
- type Int16Slice
- type Int32Slice
- type Int64Slice
- type Int8Slice
- type IntSlice
- type Lesser
- type Swapper
- type Uint16Slice
- type Uint32Slice
- type Uint64Slice
- type Uint8Slice
- type UintSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParallelSort ¶
ParallelSort sorts the given arguments in parallel. S is placed in increasing order, whilst the entries in each of the T[i] are permuted accordingly. The T[i] must have length greater than or equal to the length of S, otherwise this may panic.
func ParallelStable ¶
ParallelStable stable sorts the given arguments in parallel. S is placed in increasing order, whilst the entries in each of the T[i] are permuted accordingly. The T[i] must have length greater than or equal to the length of S, otherwise this may panic.
func SearchInt16s ¶
SearchInt16s searches for x in a sorted slice of int16s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt32s ¶
SearchInt32s searches for x in a sorted slice of int32s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt64s ¶
SearchInt64s searches for x in a sorted slice of int64s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt8s ¶
SearchInt8s searches for x in a sorted slice of int8s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInts ¶
SearchInts searches for x in a sorted slice of ints and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order. Note that this is duplicated from the "sort" package for convenience.
func SearchUint16s ¶
SearchUint16s searches for x in a sorted slice of uint16s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint32s ¶
SearchUint32s searches for x in a sorted slice of uint32s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint64s ¶
SearchUint64s searches for x in a sorted slice of uint64s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint8s ¶
SearchUint8s searches for x in a sorted slice of uint8s and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUints ¶
SearchUints searches for x in a sorted slice of uints and returns the index as specified by sort.Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
Types ¶
type Float64Slice ¶
type Float64Slice []float64
Float64Slice attaches the methods of Interface to []float64, sorting in increasing order.
func (Float64Slice) Len ¶
func (p Float64Slice) Len() int
func (Float64Slice) Less ¶
func (p Float64Slice) Less(i, j int) bool
func (Float64Slice) Swap ¶
func (p Float64Slice) Swap(i, j int)
type Int16Slice ¶
type Int16Slice []int16
Int16Slice attaches the methods of Interface to []int16, sorting in increasing order.
func (Int16Slice) Len ¶
func (p Int16Slice) Len() int
func (Int16Slice) Less ¶
func (p Int16Slice) Less(i, j int) bool
func (Int16Slice) Swap ¶
func (p Int16Slice) Swap(i, j int)
type Int32Slice ¶
type Int32Slice []int32
Int32Slice attaches the methods of Interface to []int32, sorting in increasing order.
func (Int32Slice) Len ¶
func (p Int32Slice) Len() int
func (Int32Slice) Less ¶
func (p Int32Slice) Less(i, j int) bool
func (Int32Slice) Swap ¶
func (p Int32Slice) Swap(i, j int)
type Int64Slice ¶
type Int64Slice []int64
Int64Slice attaches the methods of Interface to []int64, sorting in increasing order.
func (Int64Slice) Len ¶
func (p Int64Slice) Len() int
func (Int64Slice) Less ¶
func (p Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (p Int64Slice) Swap(i, j int)
type Int8Slice ¶
type Int8Slice []int8
Int8Slice attaches the methods of Interface to []int8, sorting in increasing order.
type IntSlice ¶
type IntSlice []int
IntSlice attaches the methods of Interface to []int, sorting in increasing order. Note that this is duplicated from the "sort" package for convenience.
type Lesser ¶
type Lesser interface {
Less(i, j int) bool // Less reports whether the element with index i should sort before the element with index j.
}
Lesser defines the Less method.
type Swapper ¶
type Swapper interface {
Swap(i, j int) // Swap exchanges the i-th and j-th elements.
}
Swapper defines the Swap method.
type Uint16Slice ¶
type Uint16Slice []uint16
Uint16Slice attaches the methods of Interface to []uint16, sorting in increasing order.
func (Uint16Slice) Len ¶
func (p Uint16Slice) Len() int
func (Uint16Slice) Less ¶
func (p Uint16Slice) Less(i, j int) bool
func (Uint16Slice) Swap ¶
func (p Uint16Slice) Swap(i, j int)
type Uint32Slice ¶
type Uint32Slice []uint32
Uint32Slice attaches the methods of Interface to []uint32, sorting in increasing order.
func (Uint32Slice) Len ¶
func (p Uint32Slice) Len() int
func (Uint32Slice) Less ¶
func (p Uint32Slice) Less(i, j int) bool
func (Uint32Slice) Swap ¶
func (p Uint32Slice) Swap(i, j int)
type Uint64Slice ¶
type Uint64Slice []uint64
Uint64Slice attaches the methods of Interface to []uint64, sorting in increasing order.
func (Uint64Slice) Len ¶
func (p Uint64Slice) Len() int
func (Uint64Slice) Less ¶
func (p Uint64Slice) Less(i, j int) bool
func (Uint64Slice) Swap ¶
func (p Uint64Slice) Swap(i, j int)
type Uint8Slice ¶
type Uint8Slice []uint8
Uint8Slice attaches the methods of Interface to []uint8, sorting in increasing order.
func (Uint8Slice) Len ¶
func (p Uint8Slice) Len() int
func (Uint8Slice) Less ¶
func (p Uint8Slice) Less(i, j int) bool
func (Uint8Slice) Swap ¶
func (p Uint8Slice) Swap(i, j int)