Documentation
¶
Index ¶
- type Config
- type FMap
- type HNSW
- func (h *HNSW[Vector]) Distance(a, b Vector) float32
- func (h *HNSW[Vector]) Dump(sb *strings.Builder)
- func (h *HNSW[Vector]) FMap(level int, fmap FMap[Vector]) error
- func (h *HNSW[Vector]) Insert(v Vector)
- func (h *HNSW[Vector]) Level() int
- func (h *HNSW[Vector]) Nodes() Nodes[Vector]
- func (h *HNSW[Vector]) Pipe(workers int) chan<- Vector
- func (h *HNSW[Vector]) Read(r Reader) error
- func (h *HNSW[Vector]) Search(q Vector, K int, efSearch int) []Vector
- func (h *HNSW[Vector]) SearchLayer(level int, addr Pointer, q Vector, ef int) pq.Queue[Vertex]
- func (h *HNSW[Vector]) Write(w Writer) error
- type Node
- type Nodes
- type Option
- type Pointer
- type Reader
- type Vertex
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HNSW ¶
type HNSW[Vector any] struct { // contains filtered or unexported fields }
HNSW data type
func FromNodes ¶ added in v0.0.2
func FromNodes[Vector any]( surface vector.Surface[Vector], nodes Nodes[Vector], opts ...Option, ) *HNSW[Vector]
Create data structure FromNodes
func (*HNSW[Vector]) SearchLayer ¶
Search "nearest" vectors on the layer
type Option ¶
type Option func(*Config)
Config Options
func WithEfConstruction ¶
Configure size of dynamic candidate list
Source Files
¶
Click to show internal directories.
Click to hide internal directories.