vector

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package vector provides optimized vector operations for the HNSW library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicSurface

type BasicSurface = vectortypes.BasicSurface

BasicSurface is a type alias for vectortypes.BasicSurface

type ContraMap

type ContraMap[V, T any] = vectortypes.ContraMap[V, T]

ContraMap is a type alias for vectortypes.ContraMap

type F32

type F32 = vectortypes.F32

F32 is a type alias for []float32 to make it more expressive

type NodeVec

type NodeVec[K comparable] struct {
	Key K
	Vec F32
}

NodeVec is a vector annotated with a key of type K

type Surface

type Surface[T any] = vectortypes.Surface[T]

Surface is a type alias for vectortypes.Surface

func CreateNodeSurface

func CreateNodeSurface[K comparable](distFunc hnsw.DistanceFunc) Surface[NodeVec[K]]

CreateNodeSurface creates a surface for NodeVec types

func CreateSurface

func CreateSurface(distFunc hnsw.DistanceFunc) Surface[F32]

CreateSurface creates a basic surface from an HNSW distance function

func HNSWNodeSurface

func HNSWNodeSurface[K cmp.Ordered](distFunc hnsw.DistanceFunc) Surface[hnsw.Node[K]]

HNSWNodeSurface creates a surface for hnsw.Node types

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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