Documentation ¶
Index ¶
- Constants
- Variables
- type Hnsw
- func (this *Hnsw) BytesSize() uint64
- func (this *Hnsw) Get(id uuid.UUID) (math.Vector, error)
- func (this *Hnsw) GetVertex(id uuid.UUID) (*hnswVertex, error)
- func (this *Hnsw) Insert(id uuid.UUID, value math.Vector, metadata Metadata, vertexLevel int) error
- func (this *Hnsw) Len() int
- func (this *Hnsw) Load(r io.Reader, header bool) error
- func (this *Hnsw) RandomLevel() int
- func (this *Hnsw) Remove(id uuid.UUID) error
- func (this *Hnsw) Save(w io.Writer, header bool) error
- func (this *Hnsw) Search(ctx context.Context, query math.Vector, k uint) (SearchResult, error)
- func (this *Hnsw) String() string
- type HnswOption
- func HnswEf(value int) HnswOption
- func HnswEfConstruction(value int) HnswOption
- func HnswHeuristicExtendCandidates(value bool) HnswOption
- func HnswHeuristicKeepPruned(value bool) HnswOption
- func HnswLevelMultiplier(value float32) HnswOption
- func HnswM(value int) HnswOption
- func HnswMmax(value int) HnswOption
- func HnswMmax0(value int) HnswOption
- func HnswSearchAlgorithm(value hnswSearchAlgorithm) HnswOption
- type Metadata
- type SearchResult
- type SearchResultItem
Constants ¶
View Source
const ( HnswSearchSimple hnswSearchAlgorithm = iota HnswSearchHeuristic )
View Source
const HNSW_VERTEX_EDGE_BYTES = 8 + 4
View Source
const HNSW_VERTEX_MUTEX_BYTES = 24
View Source
const VERTICES_MAP_SHARD_COUNT int = 16
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Hnsw ¶
type Hnsw struct {
// contains filtered or unexported fields
}
func (*Hnsw) RandomLevel ¶
type HnswOption ¶
type HnswOption interface {
// contains filtered or unexported methods
}
Options
func HnswEf ¶
func HnswEf(value int) HnswOption
func HnswEfConstruction ¶
func HnswEfConstruction(value int) HnswOption
func HnswHeuristicExtendCandidates ¶
func HnswHeuristicExtendCandidates(value bool) HnswOption
func HnswHeuristicKeepPruned ¶
func HnswHeuristicKeepPruned(value bool) HnswOption
func HnswLevelMultiplier ¶
func HnswLevelMultiplier(value float32) HnswOption
func HnswM ¶
func HnswM(value int) HnswOption
func HnswMmax ¶
func HnswMmax(value int) HnswOption
func HnswMmax0 ¶
func HnswMmax0(value int) HnswOption
func HnswSearchAlgorithm ¶
func HnswSearchAlgorithm(value hnswSearchAlgorithm) HnswOption
type SearchResult ¶
type SearchResult []SearchResultItem
func (SearchResult) Len ¶
func (this SearchResult) Len() int
func (SearchResult) Less ¶
func (this SearchResult) Less(i, j int) bool
func (SearchResult) Swap ¶
func (this SearchResult) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.