ann

package
v0.0.0-...-5ae0b98 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeBucketDivisions

func ComputeBucketDivisions(numBuckets int, keys []uint64, values []field.FP, hashKeyBits int) ([]int, []int)

func ComputeHashes

func ComputeHashes(n int, h hash.Hash, data []*vec.Vec, numBits uint64) ([]uint64, []field.FP)

func ComputeProbes

func ComputeProbes(hashFunction hash.Hash, query *vec.Vec, numPartitions, numProbes int) []uint64

func GetGeometricSequence

func GetGeometricSequence(min, max float64, numTables int) []float64

func GetNormalSequence

func GetNormalSequence(mean, stddev float64, numTables int) []float64

func GetNormalSequence2

func GetNormalSequence2(mean, stddev float64, numTables int) []float64

func GetNormalSequence3

func GetNormalSequence3(min, max float64, numTables int) ([]float64, float64, float64)

choose from a normal distribution such that min and max match the specified values

func NewDatastream

func NewDatastream(fileName string) ([]*vec.Vec, error)

func ReadDataset

func ReadDataset(datasetName string) ([]*vec.Vec, []*vec.Vec, [][]int, error)

Types

type HashTable

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

func NewHashTable

func NewHashTable(table int, numBits uint64) *HashTable

func (*HashTable) AddAll

func (t *HashTable) AddAll(h hash.Hash, data []*vec.Vec)

func (*HashTable) Get

func (t *HashTable) Get(h uint64) []uint32

func (*HashTable) Len

func (t *HashTable) Len() int

func (*HashTable) Merge

func (t *HashTable) Merge(other map[uint64][]uint32)

type PBRBuckets

type PBRBuckets struct {
	Buckets    [][2]uint64
	Size       uint64
	Max        uint64
	NumBuckets int
}

func NewPBRBuckets

func NewPBRBuckets(max uint64, numBuckets uint64) *PBRBuckets

func (*PBRBuckets) FindBucket

func (p *PBRBuckets) FindBucket(hash uint64) uint64

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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