Documentation ¶
Index ¶
- func Abs[T SignedNumeric](a T) T
- func EqualSlice[T comparable](s, t []T) bool
- func GetMapKeys[K comparable, V any](m map[K]V) []K
- func IfTrue[T any](on bool, a T, b T) (rv T)
- func InArray[T comparable](needle T, haystack []T) bool
- func KeysForStringMap[T any](aMap map[string]T) (rv []string)
- func LocationInArray[T comparable](needle T, haystack []T) int
- func Max[T constraints.Ordered](a, b T) T
- func MaxArray[T constraints.Ordered](a []T) (rv T)
- func Min[T constraints.Ordered](a, b T) T
- func MinArray[T constraints.Ordered](a []T) (rv T)
- func SortSlice[T constraints.Ordered](s []T)
- func SortedKeysForStringMap[T any](aMap map[string]T) (rv []string)
- type Numeric
- type SignedInteger
- type SignedNumeric
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[T SignedNumeric](a T) T
func EqualSlice ¶ added in v0.0.7
func EqualSlice[T comparable](s, t []T) bool
func GetMapKeys ¶ added in v0.0.6
func GetMapKeys[K comparable, V any](m map[K]V) []K
func InArray ¶
func InArray[T comparable](needle T, haystack []T) bool
InArray uses Dijkstra's "L" algorythm to search 'haystack' for 'needle'. "L" is the linear search algorythm. Exampel of Use:
func KeysForStringMap ¶
func LocationInArray ¶
func LocationInArray[T comparable](needle T, haystack []T) int
func Max ¶
func Max[T constraints.Ordered](a, b T) T
func MaxArray ¶
func MaxArray[T constraints.Ordered](a []T) (rv T)
func Min ¶
func Min[T constraints.Ordered](a, b T) T
func MinArray ¶
func MinArray[T constraints.Ordered](a []T) (rv T)
func SortSlice ¶ added in v0.0.6
func SortSlice[T constraints.Ordered](s []T)
func SortedKeysForStringMap ¶ added in v0.0.10
Types ¶
type SignedInteger ¶
Signed is a constraint with a type set of all signed integer types.
type SignedNumeric ¶
SignedNumeric is a constraint with a type set of all signed types.
Click to show internal directories.
Click to hide internal directories.