Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bruteforce ¶
type Bruteforce struct {
// contains filtered or unexported fields
}
Bruteforce is a naive implementation of vector index.
func NewBruteforce ¶
func NewBruteforce(vectors []Vector) *Bruteforce
NewBruteforce creates a Bruteforce vector index.
func (*Bruteforce) MultiSearch ¶
type DenseVector ¶
type DenseVector struct {
// contains filtered or unexported fields
}
func NewDenseVector ¶
func NewDenseVector(data []float32, terms []string, isHidden bool) *DenseVector
func (*DenseVector) Distance ¶
func (v *DenseVector) Distance(vector Vector) float32
func (*DenseVector) IsHidden ¶
func (v *DenseVector) IsHidden() bool
func (*DenseVector) Terms ¶
func (v *DenseVector) Terms() []string
type DictionaryVector ¶
type DictionaryVector struct {
// contains filtered or unexported fields
}
func NewDictionaryVector ¶
func NewDictionaryVector(indices []int32, values []float32, terms []string, isHidden bool) *DictionaryVector
func (*DictionaryVector) Distance ¶
func (v *DictionaryVector) Distance(vector Vector) float32
func (*DictionaryVector) Dot ¶
func (v *DictionaryVector) Dot(vector *DictionaryVector) (float32, float32)
func (*DictionaryVector) IsHidden ¶
func (v *DictionaryVector) IsHidden() bool
func (*DictionaryVector) Terms ¶
func (v *DictionaryVector) Terms() []string
type HNSW ¶
type HNSW struct {
// contains filtered or unexported fields
}
HNSW is a vector index based on Hierarchical Navigable Small Worlds.
func NewHNSW ¶
func NewHNSW(vectors []Vector, configs ...HNSWConfig) *HNSW
NewHNSW builds a vector index based on Hierarchical Navigable Small Worlds.
func (*HNSW) MultiSearch ¶
type HNSWBuilder ¶
type HNSWBuilder struct {
// contains filtered or unexported fields
}
func NewHNSWBuilder ¶
func NewHNSWBuilder(data []Vector, k, testSize, numJobs int) *HNSWBuilder
type HNSWConfig ¶
type HNSWConfig func(*HNSW)
HNSWConfig is the configuration function for HNSW.
func SetEFConstruction ¶
func SetEFConstruction(efConstruction int) HNSWConfig
SetEFConstruction sets efConstruction in HNSW.
func SetHNSWNumJobs ¶
func SetHNSWNumJobs(numJobs int) HNSWConfig
SetHNSWNumJobs sets the number of jobs for building index.
func SetMaxConnection ¶
func SetMaxConnection(maxConnection int) HNSWConfig
SetMaxConnection sets the number of connections in HNSW.
type IVFBuilder ¶
type IVFBuilder struct {
// contains filtered or unexported fields
}
func NewIVFBuilder ¶
func NewIVFBuilder(data []Vector, k, testSize int, configs ...IVFConfig) *IVFBuilder
type IVFConfig ¶
type IVFConfig func(ivf *IVF)
func SetClusterErrorRate ¶
func SetIVFNumJobs ¶
func SetNumProbe ¶
Click to show internal directories.
Click to hide internal directories.