Documentation ¶
Index ¶
- type Hnsw
- func (h *Hnsw) Add(q Point, id uint32)
- func (h *Hnsw) Benchmark(q Point, ef int, K int) float64
- func (h *Hnsw) Grow(size int)
- func (h *Hnsw) Link(first, second uint32, level int)
- func (h *Hnsw) Save(filename string) error
- func (h *Hnsw) Search(q Point, ef int, K int) *distqueue.DistQueueClosestLast
- func (h *Hnsw) SearchBrute(q Point, K int) *distqueue.DistQueueClosestLast
- func (h *Hnsw) Stats() string
- type Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hnsw ¶
type Hnsw struct { sync.RWMutex M int M0 int DelaunayType int DistFunc func([]float32, []float32) float32 LevelMult float64 // contains filtered or unexported fields }
func Load ¶
Load opens a index file previously written by Save(). Returnes a new index and the timestamp the file was written
func (*Hnsw) Benchmark ¶
Benchmark test precision by comparing the results of SearchBrute and Search
func (*Hnsw) SearchBrute ¶
func (h *Hnsw) SearchBrute(q Point, K int) *distqueue.DistQueueClosestLast
SearchBrute returns the true K nearest neigbours to search point q
Click to show internal directories.
Click to hide internal directories.