Help us shape the future of Go! Take the 2026 Go Developer Survey

intersect

package
v0.82.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL