hashtable

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: 3 Imported by: 13

Documentation

Index

Constants

View Source
const (
	UTILIZATION       = .75
	RECORDS_PER_BLOCK = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

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

func NewHashTable

func NewHashTable(initial_size int) *Hash

func (*Hash) Get

func (self *Hash) Get(key Hashable) (value interface{}, err error)

func (*Hash) Has

func (self *Hash) Has(key Hashable) (has bool)

func (*Hash) Items

func (self *Hash) Items() (vi KIterator)

func (*Hash) Iterate

func (self *Hash) Iterate() KVIterator

func (*Hash) Keys

func (self *Hash) Keys() KIterator

func (*Hash) Put

func (self *Hash) Put(key Hashable, value interface{}) (err error)

func (*Hash) Remove

func (self *Hash) Remove(key Hashable) (value interface{}, err error)

func (*Hash) Size

func (self *Hash) Size() int

func (*Hash) Values

func (self *Hash) Values() Iterator

type LinearHash

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

func NewLinearHash

func NewLinearHash() *LinearHash

func (*LinearHash) Get

func (self *LinearHash) Get(key Hashable) (value interface{}, err error)

func (*LinearHash) Has

func (self *LinearHash) Has(key Hashable) bool

func (*LinearHash) Items

func (self *LinearHash) Items() (vi KIterator)

func (*LinearHash) Iterate

func (self *LinearHash) Iterate() KVIterator

func (*LinearHash) Keys

func (self *LinearHash) Keys() KIterator

func (*LinearHash) Put

func (self *LinearHash) Put(key Hashable, value interface{}) (err error)

func (*LinearHash) Remove

func (self *LinearHash) Remove(key Hashable) (value interface{}, err error)

func (*LinearHash) Size

func (self *LinearHash) Size() int

func (*LinearHash) Values

func (self *LinearHash) Values() Iterator

Jump to

Keyboard shortcuts

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