lsh

package
v0.0.0-...-7779a7b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIN_NUM_ROUNDS uint32 = 1

	MIN_NUM_HYPERPLANES uint32 = 1

	MIN_SPACE_DIM uint32 = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LSH

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

func New

func New(indexName string, kv storage.Contract, numRounds, numHyperPlanes, spaceDim uint32) (l *LSH, err error)

func (*LSH) Add

func (l *LSH) Add(id string, embedding []float64) error

func (*LSH) Get

func (l *LSH) Get(queryVec []float64, threshold float64, k uint32) (neighbors []string, err error)

func (*LSH) Info

func (l *LSH) Info() map[string]any

Jump to

Keyboard shortcuts

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