fullCopy

package
v0.0.0-...-b5aa40e Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFullPersistentBST

func NewFullPersistentBST(dyn search.Dynamic) search.DynamicPersistent

Types

type BSTInstant

type BSTInstant struct {
	search.Dynamic
	// contains filtered or unexported fields
}

BSTInstant is a single BST within a Persistent BST.

type FullPersistentBST

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

FullPersistentBST is an implementation of a persistent binary search tree using full copies, with each instant represented by a separate BST.

func (*FullPersistentBST) AtInstant

func (pbst *FullPersistentBST) AtInstant(ins float64) search.Dynamic

AtInstant returns the subtree of pbst at the given instant

func (*FullPersistentBST) Copy

func (pbst *FullPersistentBST) Copy() interface{}

func (*FullPersistentBST) Delete

func (pbst *FullPersistentBST) Delete(n search.Node) error

Delete performs Delete on the current set instant's search tree.

func (*FullPersistentBST) InOrderTraverse

func (pbst *FullPersistentBST) InOrderTraverse() []search.Node

InOrderTraverse performs InOrderTraverse on the current set instant's search tree.

func (*FullPersistentBST) Insert

func (pbst *FullPersistentBST) Insert(n search.Node) error

Insert peforms Insert on the current set instant's search tree.

func (*FullPersistentBST) MaxInstant

func (pbst *FullPersistentBST) MaxInstant() float64

MaxInstant returns the maximum instant ever set on pbst.

func (*FullPersistentBST) MinInstant

func (pbst *FullPersistentBST) MinInstant() float64

MinInstant returns the minimum instant ever set on pbst.

func (*FullPersistentBST) Search

func (pbst *FullPersistentBST) Search(f interface{}) (bool, interface{})

Search performs Search on the current set instant's search tree.

func (*FullPersistentBST) SearchDown

func (pbst *FullPersistentBST) SearchDown(f interface{}, d int) (search.Comparable, interface{})

SearchDown performs SearchDown on the current set instant's search tree.

func (*FullPersistentBST) SearchUp

func (pbst *FullPersistentBST) SearchUp(f interface{}, u int) (search.Comparable, interface{})

SearchUp performs SearchUp on the current set instant's search tree.

func (*FullPersistentBST) SetInstant

func (pbst *FullPersistentBST) SetInstant(ins float64)

SetInstant increments the pbst to the given instant.

func (*FullPersistentBST) Size

func (pbst *FullPersistentBST) Size() int

Size performs Size on the current set instant's search tree.

func (*FullPersistentBST) String

func (pbst *FullPersistentBST) String() string

String returns a string representation of pbst.

func (*FullPersistentBST) ThisInstant

func (pbst *FullPersistentBST) ThisInstant() search.Dynamic

ThisInstant returns the subtree at the most recent instant set

func (*FullPersistentBST) ToStatic

func (pbst *FullPersistentBST) ToStatic() search.Static

ToStatic performs ToStatic on the current set instant's search tree.

func (*FullPersistentBST) ToStaticPersistent

func (pbst *FullPersistentBST) ToStaticPersistent() search.StaticPersistent

ToStaticPersistent returns a static peristent version of the pbst

Jump to

Keyboard shortcuts

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