hashtable

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BytePageSize = 1 << 14 // 16KB
	BytePageMask = BytePageSize - 1

	Int64PageSize = BytePageSize >> 6
	Int64PageMask = Int64PageSize - 1
)
View Source
const (
	DefaultCapacity      int64 = 2 << 10
	DefaultMaxLoadFactor       = 0.5
)

Variables

Functions

This section is empty.

Types

type ByteArray

type ByteArray []byte

func NewByteArray

func NewByteArray() ByteArray

type ByteDoubleArray

type ByteDoubleArray []ByteArray

type Int64Array

type Int64Array []int64

func NewInt64Array

func NewInt64Array() Int64Array

type Int64DoubleArray

type Int64DoubleArray []Int64Array

type IntHashMap

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

func DefaultIntHashMap

func DefaultIntHashMap() *IntHashMap

func NewIntHashMap

func NewIntHashMap(capacity int64, maxLoadFactor float64, hashFunc func(int64) uint64) *IntHashMap

func (*IntHashMap) Get

func (m *IntHashMap) Get(id uint64) int64

func (*IntHashMap) Set

func (m *IntHashMap) Set(key int64) uint64

type StringHashMap

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

func DefaultStringHashMap

func DefaultStringHashMap() *StringHashMap

func NewStringHashMap

func NewStringHashMap(capacity int64, maxLoadFactor float64, hashFunc func([]byte) uint64) *StringHashMap

func (*StringHashMap) Get

func (m *StringHashMap) Get(id uint64, dst []byte) []byte

func (*StringHashMap) Set

func (m *StringHashMap) Set(key []byte) uint64

Jump to

Keyboard shortcuts

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