hyperplanes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNumHyperplanesExceedHashBits = errors.New("number of hyperplanes exceeds available bits to encode vector")
	ErrNoVector                     = errors.New("no vector provided")
	ErrVectorLengthMismatch         = errors.New("vector length mismatch")
)

Functions

This section is empty.

Types

type Hyperplanes

type Hyperplanes struct {
	Planes [][]float64
}

Hyperplanes is composed of a number of randomly generated unit vectors where the vector length is based on the configured vector length it is to represent.

func New

func New(numHyperplanes, vecLen int) (*Hyperplanes, error)

func (*Hyperplanes) Hash8

func (h *Hyperplanes) Hash8(f []float64) (uint8, error)

func (*Hyperplanes) Hash16

func (h *Hyperplanes) Hash16(f []float64) (uint16, error)

func (*Hyperplanes) Hash32

func (h *Hyperplanes) Hash32(f []float64) (uint32, error)

func (*Hyperplanes) Hash64

func (h *Hyperplanes) Hash64(f []float64) (uint64, error)

Jump to

Keyboard shortcuts

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