Documentation ¶
Overview ¶
Package flat provides an implementation of a flat index for vector storage and search.
Index ¶
- Variables
- type Flat
- func (f *Flat) BruteSearch(query []float32, k int, filter func(id uint32) bool) ([]index.SearchResult, error)
- func (f *Flat) GobDecode(data []byte) error
- func (f *Flat) GobEncode() ([]byte, error)
- func (f *Flat) Insert(v []float32) (uint32, error)
- func (f *Flat) KNNSearch(q []float32, k int, efSearch int, filter func(id uint32) bool) ([]index.SearchResult, error)
- func (f *Flat) Stats()
- type Node
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ DistanceType: index.DistanceTypeSquaredL2, }
DefaultOptions contains the default configuration options for the flat index.
Functions ¶
This section is empty.
Types ¶
type Flat ¶
Flat represents a flat index for vector storage and search.
func (*Flat) BruteSearch ¶
func (f *Flat) BruteSearch(query []float32, k int, filter func(id uint32) bool) ([]index.SearchResult, error)
BruteSearch performs a brute-force search in the flat index.
type Options ¶
type Options struct { // DistanceType represents the type of distance function used for calculating distances between vectors. DistanceType index.DistanceType }
Options contains configuration options for the flat index.
Click to show internal directories.
Click to hide internal directories.