Documentation ¶
Index ¶
- type Bruteforce
- type CentroidVector
- type DenseVector
- type DictionaryCentroidVector
- type DictionaryVector
- func (v DictionaryVector) Centroid(vectors []Vector, indices []int32) CentroidVector
- func (v *DictionaryVector) Distance(vector Vector) float32
- func (v *DictionaryVector) Dot(vector *DictionaryVector) (float32, float32)
- func (v *DictionaryVector) IsHidden() bool
- func (v *DictionaryVector) Terms() []string
- type HNSW
- type HNSWBuilder
- type HNSWConfig
- type IVF
- type IVFBuilder
- type IVFConfig
- type Vector
- type VectorIndex
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) Centroid ¶
func (v *DenseVector) Centroid(_ []Vector, _ []int32) CentroidVector
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 DictionaryCentroidVector ¶
type DictionaryCentroidVector struct {
// contains filtered or unexported fields
}
func (*DictionaryCentroidVector) Distance ¶
func (v *DictionaryCentroidVector) Distance(vector Vector) float32
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) Centroid ¶
func (v DictionaryVector) Centroid(vectors []Vector, indices []int32) CentroidVector
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 Vector ¶
Click to show internal directories.
Click to hide internal directories.