Documentation
¶
Index ¶
- func BoolComparator(a, b bool) int
- func Complex128Comparator(a, b complex128) int
- func Complex64Comparator(a, b complex64) int
- func Float32Comparator(a, b float32) int
- func Float64Comparator(a, b float64) int
- func Int16Comparator(a, b int16) int
- func Int32Comparator(a, b int32) int
- func Int64Comparator(a, b int64) int
- func Int8Comparator(a, b int8) int
- func IntComparator(a, b int) int
- func OrderedTypeCmp[T Ordered](a, b T) int
- func StringComparator(a, b string) int
- func Uint16Comparator(a, b uint16) int
- func Uint32Comparator(a, b uint32) int
- func Uint64Comparator(a, b uint64) int
- func Uint8Comparator(a, b uint8) int
- func UintComparator(a, b uint) int
- func UintptrComparator(a, b uintptr) int
- type Comparator
- type Float
- type Integer
- type Ordered
- type Signed
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complex128Comparator ¶
func Complex128Comparator(a, b complex128) int
Complex128Comparator compare a with b
-1 , if a < b 0 , if a == b 1 , if a > b
func Complex64Comparator ¶
Complex64Comparator compare a with b
-1 , if a < b 0 , if a == b 1 , if a > b
func Float32Comparator ¶
Float32Comparator compare a with b
-1 , if a < b 0 , if a == b 1 , if a > b
func Float64Comparator ¶
Float64Comparator compare a with b
-1 , if a < b 0 , if a == b 1 , if a > b
func OrderedTypeCmp ¶ added in v1.1.0
func UintptrComparator ¶
UintptrComparator compare a with b
-1 , if a < b 0 , if a == b 1 , if a > b
Types ¶
type Comparator ¶
Comparator Should return a number:
-1 , if a < b 0 , if a == b 1 , if a > b
func Reverse ¶
func Reverse[T any](cmp Comparator[T]) Comparator[T]
Reverse returns a comparator reverse to cmp
Click to show internal directories.
Click to hide internal directories.