TreeTest

package
v0.0.0-...-55c0a6c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED   = 0
	BLACK = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyType

type KeyType interface {
	LessThan(interface{}) bool
}

type Tree

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

func NewTree

func NewTree() *Tree

func (*Tree) Clear

func (t *Tree) Clear()

Clear destroy the rbtree

func (*Tree) Empty

func (t *Tree) Empty() bool

Empty check whether the rbtree is empty

func (*Tree) Iterator

func (t *Tree) Iterator() *node

Iterator create the rbtree's iterator that points to the minmum node

func (*Tree) Size

func (t *Tree) Size() int

Size return the size of the rbtree

type TreeValue

type TreeValue interface{}

Jump to

Keyboard shortcuts

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