rbtree

package
v0.0.0-...-f5948c0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RBTree

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

RBTree is a red-black tree

func NewRBTree

func NewRBTree(less constraints.CompareFunc) *RBTree

NewRBTree creates a red-black tree

func (*RBTree) Del

func (t *RBTree) Del(key interface{})

Del deletes the stored value by given key

func (*RBTree) Get

func (t *RBTree) Get(key interface{}) interface{}

Get returns the stored value by given key

func (*RBTree) Len

func (t *RBTree) Len() int

Len returns the size of the tree

func (*RBTree) Put

func (t *RBTree) Put(key, value interface{})

Put stores the value by given key

func (*RBTree) String

func (t *RBTree) String() string

Jump to

Keyboard shortcuts

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