v1

package
v0.0.0-...-5b112dc Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RED   = 0
	BLACK = 1
)
View Source
const (
	LESS    = -1
	EQUAL   = 0
	GREATER = 1
)

Variables

View Source
var DEBUG = true

Functions

func AssertAny

func AssertAny(t *testing.T, got interface{}, expected interface{}) bool

func AssertBool

func AssertBool(t *testing.T, got bool, expected bool) bool

func AssertInt

func AssertInt(t *testing.T, got int, expected int) bool

func AssertSize

func AssertSize(t *testing.T, got int, expected int) bool

func AssertString

func AssertString(t *testing.T, got string, expected string) bool

func NewHashTree

func NewHashTree(shardCount int) *hashTree

NewHashTree returns a new sharded hash tree

func NewRBTree

func NewRBTree() *rbTree

Types

type Entry

type Entry struct {
	Key   EntryKey
	Value EntryValue
}

Entry represents a key value pair for the ordered map. If the user decides to change any of this, take care to ensure you implement the Item interface properly in order to keep everything in working order.

func NewEntry

func NewEntry(key EntryKey, value EntryValue) Entry

func NewKey

func NewKey(key EntryKey) Entry

func (Entry) Compare

func (e Entry) Compare(that Item) int

Compare implements the Item interface

func (Entry) String

func (e Entry) String() string

type EntryKey

type EntryKey = string

type EntryValue

type EntryValue = string

type Item

type Item interface {
	Compare(that Item) int
	fmt.Stringer
}

type Iterator

type Iterator func(item Item) bool

type RBTree

type RBTree = rbTree

Jump to

Keyboard shortcuts

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