Documentation ¶
Index ¶
- func Generic[T comparable](f func(a, b []T) []T, b []T, c ...[]T) []T
- func GenericDiff[T comparable](f func(a, b []T) []T, b []T, c ...[]T) []T
- func Hash(a interface{}, b interface{}) []interface{}deprecated
- func HashGeneric[T comparable](a []T, b []T) []T
- func Simple(a interface{}, b interface{}) []interface{}deprecated
- func SimpleGeneric[T comparable](a []T, b []T) []T
- func Sorted(a interface{}, b interface{}) []interface{}deprecated
- func SortedGeneric[T comparable](a []T, b []T) []T
- type Arrayable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generic ¶
func Generic[T comparable](f func(a, b []T) []T, b []T, c ...[]T) []T
func GenericDiff ¶
func GenericDiff[T comparable](f func(a, b []T) []T, b []T, c ...[]T) []T
func Hash
deprecated
func Hash(a interface{}, b interface{}) []interface{}
Deprecated: Use HashGeneric instead. Complexity same as HashGeneric.
func HashGeneric ¶
func HashGeneric[T comparable](a []T, b []T) []T
Hash has complexity: O(n * x) where x is a factor of hash function efficiency (between 1 and 2)
func Simple
deprecated
func Simple(a interface{}, b interface{}) []interface{}
Deprecated: Use SimpleGeneric instead. Complexity same as SimpleGeneric.
func SimpleGeneric ¶
func SimpleGeneric[T comparable](a []T, b []T) []T
Simple has complexity: O(n^2)
func Sorted
deprecated
func Sorted(a interface{}, b interface{}) []interface{}
Deprecated: Use SortedGeneric instead. Complexity same as SortedGeneric.
func SortedGeneric ¶
func SortedGeneric[T comparable](a []T, b []T) []T
Sorted has complexity: O(n * log(n)), a needs to be sorted
Types ¶
type Arrayable ¶
type Arrayable[T comparable] interface { Array() []T }
Click to show internal directories.
Click to hide internal directories.