radix

package
v0.0.0-...-b9d058e Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys[K trie.Elem, V any](m *RadixMap[K, V]) [][]K

func Values

func Values[K trie.Elem, V any](m *RadixMap[K, V]) []V

Types

type ItemIterator

type ItemIterator[K trie.Elem, V any] func(key []K, v V) bool

type RadixMap

type RadixMap[K trie.Elem, V any] struct {
	// contains filtered or unexported fields
}

func NewRadixMap

func NewRadixMap[K trie.Elem, V any]() *RadixMap[K, V]

func (*RadixMap[K, V]) Ascend

func (t *RadixMap[K, V]) Ascend(iterator ItemIterator[K, V])

func (*RadixMap[K, V]) AscendGreaterOrEqual

func (t *RadixMap[K, V]) AscendGreaterOrEqual(greaterOrEqual []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) AscendLessThan

func (t *RadixMap[K, V]) AscendLessThan(lessThan []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) AscendPrefix

func (t *RadixMap[K, V]) AscendPrefix(prefix []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) AscendRange

func (t *RadixMap[K, V]) AscendRange(greaterThan []K, lessOrEqual []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) Delete

func (t *RadixMap[K, V]) Delete(key []K) (_ V, _ bool)

func (*RadixMap[K, V]) DeletePrefix

func (t *RadixMap[K, V]) DeletePrefix(prefix []K) (_ *RadixMap[K, V])

func (*RadixMap[K, V]) Descend

func (t *RadixMap[K, V]) Descend(iterator ItemIterator[K, V])

func (*RadixMap[K, V]) DescendGreaterThan

func (t *RadixMap[K, V]) DescendGreaterThan(greaterThan []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) DescendLessOrEqual

func (t *RadixMap[K, V]) DescendLessOrEqual(lessOrEqual []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) DescendRange

func (t *RadixMap[K, V]) DescendRange(greaterThan []K, lessOrEqual []K, iterator ItemIterator[K, V])

func (*RadixMap[K, V]) Get

func (t *RadixMap[K, V]) Get(key []K) (_ V, _ bool)

func (*RadixMap[K, V]) Len

func (t *RadixMap[K, V]) Len() int

func (*RadixMap[K, V]) LongestPrefix

func (t *RadixMap[K, V]) LongestPrefix(prefix []K) (longest []K, value V, hasValue bool)

func (*RadixMap[K, V]) MarkDelete

func (t *RadixMap[K, V]) MarkDelete(key []K) (_ V, _ bool)

func (*RadixMap[K, V]) Max

func (t *RadixMap[K, V]) Max() (_ []K, _ V, _ bool)

func (*RadixMap[K, V]) Min

func (t *RadixMap[K, V]) Min() (_ []K, _ V, _ bool)

func (*RadixMap[K, V]) ReplaceOrInsert

func (t *RadixMap[K, V]) ReplaceOrInsert(key []K, value V) (_ V, _ bool)

func (*RadixMap[K, V]) ReplaceOrInsertExtend

func (t *RadixMap[K, V]) ReplaceOrInsertExtend(key []K, value V, replaceFunc ReplaceFunc[K, V]) (_ V, _ bool)

func (*RadixMap[K, V]) Shrink

func (t *RadixMap[K, V]) Shrink()

type ReplaceFunc

type ReplaceFunc[K trie.Elem, V any] func(old V) V

Jump to

Keyboard shortcuts

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