splay

package
v0.0.0-...-604e922 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2013 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any interface{}

type LessFunc

type LessFunc func(interface{}, interface{}) bool

type SplayTree

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

func New

func New(less LessFunc) *SplayTree

Create a new splay tree, using the less function to determine the order.

func (*SplayTree) Add

func (this *SplayTree) Add(value Any)

func (*SplayTree) Do

func (this *SplayTree) Do(visit VisitFunc)

func (*SplayTree) First

func (this *SplayTree) First() Any

Get the first value from the collection. Returns nil if empty.

func (*SplayTree) Get

func (this *SplayTree) Get(item Any) Any

Get an item from the splay tree

func (*SplayTree) Has

func (this *SplayTree) Has(value Any) bool

func (*SplayTree) InOrder

func (this *SplayTree) InOrder(visit VisitFunc)

func (*SplayTree) Init

func (this *SplayTree) Init()

func (*SplayTree) Last

func (this *SplayTree) Last() Any

Get the last value from the collection. Returns nil if empty.

func (*SplayTree) Len

func (this *SplayTree) Len() int

func (*SplayTree) PostOrder

func (this *SplayTree) PostOrder(visit VisitFunc)

func (*SplayTree) PreOrder

func (this *SplayTree) PreOrder(visit VisitFunc)

func (*SplayTree) Remove

func (this *SplayTree) Remove(value Any)

func (*SplayTree) String

func (this *SplayTree) String() string

type VisitFunc

type VisitFunc func(interface{}) bool

Jump to

Keyboard shortcuts

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