hashed_index

package
v0.0.0-...-e0ee87b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Hasher = func(h Key) uintptr { return container.Hash(h) }
View Source
var KeyFunc = func(Value) Key { return 0 }

Functions

This section is empty.

Types

type Buckets

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

func NewBuckets

func NewBuckets(size uintptr) *Buckets

func (*Buckets) At

func (b *Buckets) At(i uintptr) *HashedIndexNode

func (*Buckets) Put

func (b *Buckets) Put(i uintptr, e *HashedIndexNode)

type FinalIndex

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

generic class

type FinalNode

type FinalNode struct {
	GetSuperNode func() interface{}
	GetFinalNode func() interface{}
}

generic class

type HashedIndex

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

func (*HashedIndex) Begin

func (h *HashedIndex) Begin() Iterator

func (*HashedIndex) Empty

func (h *HashedIndex) Empty() bool

func (*HashedIndex) End

func (h *HashedIndex) End() Iterator

func (*HashedIndex) Erase

func (h *HashedIndex) Erase(iter Iterator)

func (*HashedIndex) Find

func (h *HashedIndex) Find(k Key) Iterator

func (*HashedIndex) GetFinalIndex

func (h *HashedIndex) GetFinalIndex() interface{}

func (*HashedIndex) GetSuperIndex

func (h *HashedIndex) GetSuperIndex() interface{}

func (*HashedIndex) Insert

func (h *HashedIndex) Insert(v Value) (Iterator, bool)

func (*HashedIndex) Modify

func (h *HashedIndex) Modify(iter Iterator, mod func(*Value)) bool

func (*HashedIndex) Size

func (h *HashedIndex) Size() int

func (*HashedIndex) Values

func (h *HashedIndex) Values() []Value

type HashedIndexNode

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

func NewHashedIndexNode

func NewHashedIndexNode(bucket uintptr, key Key) *HashedIndexNode

func (*HashedIndexNode) Get

func (n *HashedIndexNode) Get(key Key) *HashedIndexNode

func (*HashedIndexNode) GetFinalNode

func (n *HashedIndexNode) GetFinalNode() interface{}

func (*HashedIndexNode) GetSuperNode

func (n *HashedIndexNode) GetSuperNode() interface{}

type Iterator

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

func (Iterator) HasNext

func (iter Iterator) HasNext() bool

func (Iterator) IsEnd

func (iter Iterator) IsEnd() bool

func (*Iterator) Next

func (iter *Iterator) Next() bool

func (Iterator) Value

func (iter Iterator) Value() (v Value)

type Key

type Key = int

template type HashedIndex(FinalIndex,FinalNode,SuperIndex,SuperNode,Value,Key,KeyFunc,Hasher,Allocator)

type SuperIndex

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

generic class

func NewSuperIndex

func NewSuperIndex() *SuperIndex

type SuperNode

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

generic class

type Value

type Value = int

Jump to

Keyboard shortcuts

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