Versions in this module Expand all Collapse all v0 v0.2.0 Apr 18, 2021 Changes in this version + const IOFlagMmap + const IOFlagReadOnly + func WriteIndex(idx Index, filename string) error + type IndexImpl struct + func ReadIndex(filename string, ioflags int) (*IndexImpl, error) + func (idx *IndexImpl) AsFlat() *IndexFlat v0.1.0 Feb 15, 2021 Changes in this version + const MetricBrayCurtis + const MetricCanberra + const MetricInnerProduct + const MetricJensenShannon + const MetricL1 + const MetricL2 + const MetricLinf + const MetricLp + type IDSelector struct + func NewIDSelectorBatch(indices []int64) (*IDSelector, error) + func NewIDSelectorRange(imin, imax int64) (*IDSelector, error) + func (s *IDSelector) Delete() + type Index struct + func IndexFactory(d int, description string, metric int) (*Index, error) + func (idx *Index) Add(x []float32) error + func (idx *Index) AddWithIDs(x []float32, xids []int64) error + func (idx *Index) AsFlat() *IndexFlat + func (idx *Index) D() int + func (idx *Index) Delete() + func (idx *Index) IsTrained() bool + func (idx *Index) MetricType() int + func (idx *Index) Ntotal() int64 + func (idx *Index) RangeSearch(x []float32, radius float32) (*RangeSearchResult, error) + func (idx *Index) RemoveIDs(sel *IDSelector) (int, error) + func (idx *Index) Reset() error + func (idx *Index) Search(x []float32, k int64) (distances []float32, labels []int64, err error) + func (idx *Index) Train(x []float32) error + type IndexFlat struct + func NewIndexFlat(d int, metric int) (*IndexFlat, error) + func NewIndexFlatIP(d int) (*IndexFlat, error) + func NewIndexFlatL2(d int) (*IndexFlat, error) + func (idx *IndexFlat) Add(x []float32) error + func (idx *IndexFlat) AddWithIDs(x []float32, xids []int64) error + func (idx *IndexFlat) D() int + func (idx *IndexFlat) Delete() + func (idx *IndexFlat) IsTrained() bool + func (idx *IndexFlat) MetricType() int + func (idx *IndexFlat) Ntotal() int64 + func (idx *IndexFlat) RangeSearch(x []float32, radius float32) (*RangeSearchResult, error) + func (idx *IndexFlat) RemoveIDs(sel *IDSelector) (int, error) + func (idx *IndexFlat) Reset() error + func (idx *IndexFlat) Search(x []float32, k int64) (distances []float32, labels []int64, err error) + func (idx *IndexFlat) Train(x []float32) error + func (idx *IndexFlat) Xb() []float32 + type ParameterSpace struct + func NewParameterSpace() (*ParameterSpace, error) + func (p *ParameterSpace) Delete() + func (p *ParameterSpace) SetIndexParameter(idx *Index, name string, val float64) error + type RangeSearchResult struct + func (r *RangeSearchResult) Delete() + func (r *RangeSearchResult) Labels() (labels []int64, distances []float32) + func (r *RangeSearchResult) Lims() []int + func (r *RangeSearchResult) Nq() int