Versions in this module Expand all Collapse all v1 v1.0.0 Sep 13, 2023 Changes in this version + const Efconstruction + const M + const Mmax + const Mmax0 + const Version + type HNSW struct + Efconstruction int + Ep int64 + Heuristic bool + M int + Maxlevel int + Ml float64 + Mmax int + Mmax0 int + NodeList NodeList + Wg sync.WaitGroup + func Load(filename string) (h HNSW, err error) + func New(m int, mmax int, mmax0 int, efconstruction int, vecsize int) (h HNSW, err error) + func (h *HNSW) AddConnections(neighbourNode uint32, newNode uint32, level int) + func (h *HNSW) BruteSearch(q *[]float32, K int) (topCandidates queue.PriorityQueue, err error) + func (h *HNSW) BruteSearchConcurrent(size int, K int, numWorkers int) (resultChan chan SearchResults, jobs chan SearchQuery, err error) + func (h *HNSW) BruteSearchWorker(id int, K int, jobs <-chan SearchQuery, resultChan chan<- SearchResults) error + func (h *HNSW) FindEp(q *[]float32, currentObj *Node, layer int16) (match Node, currentDist float32, err error) + func (h *HNSW) GetConnections(ep *Node, level int) []uint32 + func (h *HNSW) Insert(q []float32) (uint32, error) + func (h *HNSW) InsertConcurrent(size int) (resultChan chan uint32, jobs chan []float32, err error) + func (h *HNSW) InsertWorker(id int, jobs <-chan []float32, resultChan chan<- uint32) error + func (h *HNSW) KnnSearch(q Node, K int, ef int) (nearestElements []Node) + func (h *HNSW) LegacySearchLayer(q *[]float32, ep *[]float32, C *[]uint32, M int) queue.PriorityQueue + func (h *HNSW) PeekNode(id int) Node + func (h *HNSW) Save(filename string) (err error) + func (h *HNSW) Search(q *[]float32, topCandidates *queue.PriorityQueue, K int, efSearch int) (err error) + func (h *HNSW) SearchConcurrent(size int, K int, efSearch int, numWorkers int) (resultChan chan SearchResults, jobs chan SearchQuery, err error) + func (h *HNSW) SearchLayer(q *[]float32, ep *queue.Item, topCandidates *queue.PriorityQueue, ef int, ...) (err error) + func (h *HNSW) SearchWorker(id int, K int, efSearch int, jobs <-chan SearchQuery, ...) error + func (h *HNSW) SelectNeighboursHeuristic(topCandidates *queue.PriorityQueue, M int, order bool) + func (h *HNSW) SelectNeighboursSimple(topCandidates *queue.PriorityQueue, M int) + func (h *HNSW) Stats() + type HNSW_Meta struct + Efconstruction int + Ep int64 + Heuristic bool + M int + Maxlevel int + Ml float64 + Mmax int + Mmax0 int + type Node struct + Connections [][]uint32 + Id uint32 + Layer int + Vectors []float32 + type NodeList struct + Nodes []Node + type SearchQuery struct + Id int + Qp []float32 + type SearchResults struct + BestCandidates queue.PriorityQueue + Id int