bptree

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BpMap

type BpMap BpTree

A BpMap is a B+Tree with support for duplicate keys disabled. This makes it * behave like a regular Map rather than a MultiMap.

func NewBpMap

func NewBpMap(node_size int) *BpMap

func (*BpMap) Get

func (self *BpMap) Get(key types.Hashable) (value interface{}, err error)

func (*BpMap) Has

func (self *BpMap) Has(key types.Hashable) bool

func (*BpMap) Iterate

func (self *BpMap) Iterate() (kvi types.KVIterator)

func (*BpMap) Keys

func (self *BpMap) Keys() (ki types.KIterator)

func (*BpMap) Put

func (self *BpMap) Put(key types.Hashable, value interface{}) (err error)

func (*BpMap) Remove

func (self *BpMap) Remove(key types.Hashable) (value interface{}, err error)

func (*BpMap) Size

func (self *BpMap) Size() int

func (*BpMap) Values

func (self *BpMap) Values() (vi types.Iterator)

type BpNode

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

func NewInternal

func NewInternal(size int) *BpNode

func NewLeaf

func NewLeaf(size int, no_dup bool) *BpNode

func (*BpNode) Full

func (self *BpNode) Full() bool

func (*BpNode) Height

func (self *BpNode) Height() int

func (*BpNode) Internal

func (self *BpNode) Internal() bool

func (*BpNode) NodeSize

func (self *BpNode) NodeSize() int

func (*BpNode) Pure

func (self *BpNode) Pure() bool

type BpTree

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

A BpTree is a B+Tree with support for duplicate keys. This makes it behave as * a MultiMap. Additionally you can use the Range operator to select k/v in a * range. If from > to it will iterate backwards.

func NewBpTree

func NewBpTree(node_size int) *BpTree

func (*BpTree) Add

func (self *BpTree) Add(key types.Hashable, value interface{}) (err error)

func (*BpTree) Backward

func (self *BpTree) Backward() (kvi types.KVIterator)

func (*BpTree) Count

func (self *BpTree) Count(key types.Hashable) int

func (*BpTree) Find

func (self *BpTree) Find(key types.Hashable) (kvi types.KVIterator)

func (*BpTree) Has

func (self *BpTree) Has(key types.Hashable) bool

func (*BpTree) Items

func (self *BpTree) Items() (vi types.KIterator)

func (*BpTree) Iterate

func (self *BpTree) Iterate() (kvi types.KVIterator)

func (*BpTree) Keys

func (self *BpTree) Keys() (ki types.KIterator)

func (*BpTree) Range

func (self *BpTree) Range(from, to types.Hashable) (kvi types.KVIterator)

func (*BpTree) RemoveWhere

func (self *BpTree) RemoveWhere(key types.Hashable, where types.WhereFunc) (err error)

func (*BpTree) Replace

func (self *BpTree) Replace(key types.Hashable, where types.WhereFunc, value interface{}) (err error)

func (*BpTree) Size

func (self *BpTree) Size() int

func (*BpTree) Values

func (self *BpTree) Values() (vi types.Iterator)

Jump to

Keyboard shortcuts

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