util

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PairCombinateFunc

func PairCombinateFunc[S ~[]E, E cmp.Ordered](a S, fn func(a, b E))

Types

type Connection

type Connection SetMap[string, string]

func NewConnection

func NewConnection(elements ...string) Connection

func (Connection) Connect

func (c Connection) Connect(u, v string)

func (Connection) GetClusters

func (c Connection) GetClusters() []mapset.Set[string]

func (Connection) GetConnection

func (c Connection) GetConnection(elem string, distance int) mapset.Set[string]

type Pair

type Pair[T any] struct{ L, R T }

func PairCombinate

func PairCombinate[S ~[]E, E cmp.Ordered](x S) []Pair[E]

type SetMap

type SetMap[K, V comparable] map[K]mapset.Set[V]

func NewSetMap

func NewSetMap[K, V comparable](keys ...K) SetMap[K, V]

func (SetMap[K, V]) Add

func (m SetMap[K, V]) Add(key K, value V)

func (SetMap[K, V]) Intersect

func (m SetMap[K, V]) Intersect(key K, other mapset.Set[V])

Jump to

Keyboard shortcuts

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