bijection

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bijection

type Bijection[T1, T2 comparable] struct {
	// contains filtered or unexported fields
}

func NewBijection

func NewBijection[T1, T2 comparable]() *Bijection[T1, T2]

func (*Bijection[T1, T2]) Add

func (m *Bijection[T1, T2]) Add(t1 T1, t2 T2) error

func (*Bijection[T1, T2]) DeleteT1

func (m *Bijection[T1, T2]) DeleteT1(key T1) bool

func (*Bijection[T1, T2]) DeleteT2

func (m *Bijection[T1, T2]) DeleteT2(key T2) bool

func (*Bijection[T1, T2]) LookupByT1

func (m *Bijection[T1, T2]) LookupByT1(key T1) (value T2, exists bool)

func (*Bijection[T1, T2]) LookupByT2

func (m *Bijection[T1, T2]) LookupByT2(key T2) (value T1, exists bool)

Jump to

Keyboard shortcuts

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