ordmap

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MAX = 5 // must be odd

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	K Key
	V Value
}

type Iterator

type Iterator struct {
	Entry Entry
	// contains filtered or unexported fields
}

func (*Iterator) Done

func (i *Iterator) Done() bool

func (*Iterator) Next

func (i *Iterator) Next()

type Key

type Key interface {
	Cmp(Key) int
}

type OrdMap

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

func (*OrdMap) Entries

func (n *OrdMap) Entries() []Entry

func (*OrdMap) Get

func (n *OrdMap) Get(key Key) (value Value, ok bool)

func (*OrdMap) Height

func (n *OrdMap) Height() int

func (*OrdMap) Insert

func (n *OrdMap) Insert(key Key, value Value) *OrdMap

func (*OrdMap) Iterate

func (n *OrdMap) Iterate() Iterator

func (*OrdMap) Max

func (n *OrdMap) Max() *Entry

func (*OrdMap) Min

func (n *OrdMap) Min() *Entry

func (*OrdMap) Remove

func (n *OrdMap) Remove(key Key) *OrdMap

type Value

type Value interface{}

Jump to

Keyboard shortcuts

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