bimultimap

package
v0.0.0-...-a9160b4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BiMultiMap

type BiMultiMap struct {
	// contains filtered or unexported fields
}

BiMultiMap is a bimultimap from interface{} to interface{}

func MakeBiMultiMap

func MakeBiMultiMap() *BiMultiMap

MakeBiMultiMap returns an empty BiMultiMap

func (*BiMultiMap) Insert

func (m *BiMultiMap) Insert(l interface{}, r interface{})

Insert inserts a mapping between two values

func (*BiMultiMap) Left

func (m *BiMultiMap) Left(l interface{}) []interface{}

Left returns a slice of values that are associated with the given left key `l`.

func (*BiMultiMap) LeftKeys

func (m *BiMultiMap) LeftKeys() []interface{}

LeftKeys returns a slice containing the left keys of the BiMultiMap

func (*BiMultiMap) Remove

func (m *BiMultiMap) Remove(l interface{}, r interface{})

Remove removes the mapping between `l` and `r`

func (*BiMultiMap) RemoveLeft

func (m *BiMultiMap) RemoveLeft(l interface{})

RemoveLeft removes the left key, along with values that it maps to on the right

func (*BiMultiMap) RemoveRight

func (m *BiMultiMap) RemoveRight(r interface{})

RemoveRight removes the right key, along with values that it maps to on the left

func (*BiMultiMap) Right

func (m *BiMultiMap) Right(r interface{}) []interface{}

Right returns a slice of values that are associated with the given right key `r`.

func (*BiMultiMap) RightKeys

func (m *BiMultiMap) RightKeys() []interface{}

RightKeys returns a slice containing the right keys of the BiMultiMap

Jump to

Keyboard shortcuts

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