|
XVector
|
FAISS-free description of an HNSW-Flat index. More...
#include <xvec_hnsw_flat.h>
Public Attributes | |
| xvecDimensionType | dimension |
| Dimension of each vector (d). More... | |
| xvecVectorIdType | numVectors |
| Total number of graph nodes / vectors. More... | |
| xvecDistanceType | distanceType |
| Distance metric the graph was built under. More... | |
| uint32_t | M |
| Max neighbors per node at levels >= 1. More... | |
| uint32_t | M0 |
| Max neighbors per node at level 0 (usually 2*M). More... | |
| uint32_t | maxLevel |
| Highest level in the hierarchy. More... | |
| xvecVectorIdType | entryPointId |
| Graph entry-point node id; must be < numVectors. More... | |
| const xvecFloat32 * | vectors |
| Vectors, row-major by node id [numVectors * dimension]. More... | |
| const uint32_t * | nodeLevels |
| Top level (0-based) of each node [numVectors]. More... | |
| const uint64_t * | neighborOffsets |
Per-node start offset into neighbors [numVectors + 1]. More... | |
| const xvecVectorIdType * | neighbors |
| Flat neighbor ids; per node level 0 (M0 slots) then each higher level (M slots); empty slots are -1. More... | |
FAISS-free description of an HNSW-Flat index.
Fully describes the hierarchical graph so an index can be built with no FAISS dependency. The neighbor layout mirrors FAISS's HNSW storage: per node, a contiguous slice of neighbors holds all of that node's levels – level 0 first (M0 slots) then each higher level (M slots) – with empty slots set to -1. neighborOffsets gives each node's start into that flat array, so node i occupies [neighborOffsets[i], neighborOffsets[i + 1]), which must equal M0 + nodeLevels[i] * M.
Definition at line 119 of file xvec_hnsw_flat.h.
| xvecDimensionType xvecHnswFlatDescriptor::dimension |
Dimension of each vector (d).
Definition at line 121 of file xvec_hnsw_flat.h.
| xvecDistanceType xvecHnswFlatDescriptor::distanceType |
Distance metric the graph was built under.
Definition at line 123 of file xvec_hnsw_flat.h.
| xvecVectorIdType xvecHnswFlatDescriptor::entryPointId |
Graph entry-point node id; must be < numVectors.
Definition at line 127 of file xvec_hnsw_flat.h.
| uint32_t xvecHnswFlatDescriptor::M |
Max neighbors per node at levels >= 1.
Definition at line 124 of file xvec_hnsw_flat.h.
| uint32_t xvecHnswFlatDescriptor::M0 |
Max neighbors per node at level 0 (usually 2*M).
Definition at line 125 of file xvec_hnsw_flat.h.
| uint32_t xvecHnswFlatDescriptor::maxLevel |
Highest level in the hierarchy.
Definition at line 126 of file xvec_hnsw_flat.h.
| const uint64_t* xvecHnswFlatDescriptor::neighborOffsets |
Per-node start offset into neighbors [numVectors + 1].
Definition at line 130 of file xvec_hnsw_flat.h.
| const xvecVectorIdType* xvecHnswFlatDescriptor::neighbors |
Flat neighbor ids; per node level 0 (M0 slots) then each higher level (M slots); empty slots are -1.
Definition at line 131 of file xvec_hnsw_flat.h.
| const uint32_t* xvecHnswFlatDescriptor::nodeLevels |
Top level (0-based) of each node [numVectors].
Definition at line 129 of file xvec_hnsw_flat.h.
| xvecVectorIdType xvecHnswFlatDescriptor::numVectors |
Total number of graph nodes / vectors.
Definition at line 122 of file xvec_hnsw_flat.h.
| const xvecFloat32* xvecHnswFlatDescriptor::vectors |
Vectors, row-major by node id [numVectors * dimension].
Definition at line 128 of file xvec_hnsw_flat.h.