btree

package
v0.0.0-...-a65b463 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultOrder = 45

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item[K cmp.Ordered, V any] struct {
	Key       K
	Value     V
	ChildPage *Page[K, V]
}

type Page

type Page[K cmp.Ordered, V any] struct {
	Items      []Item[K, V]
	ChildPage0 *Page[K, V]
}

type PathItem

type PathItem[K cmp.Ordered, V any] struct {
	Page      *Page[K, V]
	ChildPage *Page[K, V]
	Index     int
}

type Tree

type Tree[K cmp.Ordered, V any] struct {
	Root *Page[K, V]

	Order int

	SearchPath []PathItem[K, V]
}

func (*Tree[K, V]) Clear

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

func (*Tree[K, V]) Del

func (t *Tree[K, V]) Del(key K)

func (*Tree[K, V]) Get

func (t *Tree[K, V]) Get(key K) V

func (*Tree[K, V]) Has

func (t *Tree[K, V]) Has(key K) bool

func (*Tree[K, V]) Set

func (t *Tree[K, V]) Set(key K, value V)

func (Tree[K, V]) String

func (t Tree[K, V]) String() string

Jump to

Keyboard shortcuts

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