treemap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TreeMap

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

func New

func New[K, V any](keyCompare structs.CompareFunc[K], valueCompare structs.CompareFunc[V]) *TreeMap[K, V]

func (*TreeMap[K, V]) Clear

func (t *TreeMap[K, V]) Clear()

func (*TreeMap[K, V]) ContainsKey

func (t *TreeMap[K, V]) ContainsKey(key K) bool

func (*TreeMap[K, V]) ContainsValue

func (t *TreeMap[K, V]) ContainsValue(value V) bool

func (*TreeMap[K, V]) FindNode

func (t *TreeMap[K, V]) FindNode(value V) *TreeNode[K, V]

func (*TreeMap[K, V]) GetKey

func (t *TreeMap[K, V]) GetKey(value V) K

func (*TreeMap[K, V]) GetNode

func (t *TreeMap[K, V]) GetNode(key K) *TreeNode[K, V]

func (*TreeMap[K, V]) GetValue

func (t *TreeMap[K, V]) GetValue(key K) V

func (*TreeMap[K, V]) Put

func (t *TreeMap[K, V]) Put(key K, value V) V

func (*TreeMap[K, V]) Size

func (t *TreeMap[K, V]) Size() int

type TreeNode

type TreeNode[K, V any] struct {
	Key    K
	Value  V
	Black  bool
	Parent *TreeNode[K, V]
	Left   *TreeNode[K, V]
	Right  *TreeNode[K, V]
}

Jump to

Keyboard shortcuts

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