dense

package module
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 4 Imported by: 0

README

dense

Generic implementations of dense sets and maps

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V any](size int) *Map[K, V]

func (*Map[K, V]) Clear added in v0.1.5

func (m *Map[K, V]) Clear()

func (*Map[K, V]) Contains

func (m *Map[K, V]) Contains(key K) bool

func (*Map[K, V]) Delete added in v0.1.5

func (m *Map[K, V]) Delete(k K)

func (*Map[K, V]) Each added in v0.1.7

func (m *Map[K, V]) Each(f func(key K, val V))

func (*Map[K, V]) EachRef added in v0.1.7

func (m *Map[K, V]) EachRef(f func(key K, valRef *V))

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(key K) (val V, hasval bool)

func (*Map[K, V]) GetRef added in v0.1.1

func (m *Map[K, V]) GetRef(key K) (val *V, hasval bool)

func (*Map[K, V]) Insert

func (m *Map[K, V]) Insert(key K, val V)

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() int

func (*Map[K, V]) MustGet

func (m *Map[K, V]) MustGet(key K) (out V)

func (*Map[K, V]) MustGetRef added in v0.1.1

func (m *Map[K, V]) MustGetRef(key K) (out *V)

type Pair added in v0.1.1

type Pair[K, V any] struct {
	Key K
	Val V
}

Jump to

Keyboard shortcuts

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