|
XVector
|
FAISS-free description of an IVF-RaBitQ index. More...
#include <xvec_ivf_rabitq.h>
Public Attributes | |
| xvecDimensionType | dimension |
| Dimension of each vector (d). More... | |
| xvecClusterIdType | numClusters |
| Number of IVF clusters (nlist). More... | |
| xvecVectorIdType | numVectors |
| Total number of vectors; must equal the sum of listSizes. More... | |
| xvecDistanceType | distanceType |
| Distance metric (L2 or DOT_PRODUCT). More... | |
| uint32_t | binaryCodeSize |
| Bytes of binary code per vector; must equal (dimension + 7) / 8. More... | |
| uint8_t | defaultQb |
| Default query quantization bits (0 = no query quantization). More... | |
| const xvecFloat32 * | centroids |
| Coarse centroids, row-major [numClusters * dimension]. More... | |
| const xvecVectorIdType * | listSizes |
| Vectors per cluster [numClusters]; entries sum to numVectors. More... | |
| const uint8_t * | binaryCodes |
| Binary codes grouped by cluster [numVectors * binaryCodeSize]. More... | |
| const xvecFloat32 * | factors |
| Two factors per vector [numVectors * 2], grouped by cluster: {orMinusCL2sqr, dpMultiplier} for each vector. More... | |
| const xvecVectorIdType * | ids |
| Original id per vector [numVectors], in the same grouped order. More... | |
| uint8_t | nbBits |
| Bits per dimension: 1 sign bit + (nbBits - 1) magnitude bits. More... | |
| uint32_t | exCodeSize |
| Bytes of ex-bit code per vector; must equal (dimension * (nbBits - 1) + 7) / 8. More... | |
| const uint8_t * | exCodes |
| Ex-bit codes grouped by cluster [numVectors * exCodeSize]. More... | |
| const xvecFloat32 * | exFactors |
| Three factors per vector [numVectors * 3], grouped by cluster: {fError, fAddEx, fRescaleEx} for each vector. More... | |
FAISS-free description of an IVF-RaBitQ index.
Fully describes an IVF-RaBitQ index using plain C arrays, with no dependency on FAISS types or ABI. Per-vector data (binary codes, factors, ids) is grouped by cluster: the first listSizes[0] vectors belong to cluster 0, the next listSizes[1] to cluster 1, and so on.
The binary codes and the distance factors are supplied as separate arrays (rather than the FAISS-packed code blob) so the layout carries no dependency on FAISS's internal factor representation.
A multi-bit index (nbBits > 1) additionally supplies exCodes and exFactors. These fields are appended at the end of the struct, so a caller that zero-initializes the descriptor and leaves them unset describes a 1-bit index exactly as before.
All pointers are borrowed for the duration of the load call only; the caller retains ownership and may free them once the call returns.
Definition at line 79 of file xvec_ivf_rabitq.h.
| const uint8_t* xvecIvfRaBitQDescriptor::binaryCodes |
Binary codes grouped by cluster [numVectors * binaryCodeSize].
Definition at line 89 of file xvec_ivf_rabitq.h.
| uint32_t xvecIvfRaBitQDescriptor::binaryCodeSize |
Bytes of binary code per vector; must equal (dimension + 7) / 8.
Definition at line 85 of file xvec_ivf_rabitq.h.
| const xvecFloat32* xvecIvfRaBitQDescriptor::centroids |
Coarse centroids, row-major [numClusters * dimension].
Definition at line 87 of file xvec_ivf_rabitq.h.
| uint8_t xvecIvfRaBitQDescriptor::defaultQb |
Default query quantization bits (0 = no query quantization).
Definition at line 86 of file xvec_ivf_rabitq.h.
| xvecDimensionType xvecIvfRaBitQDescriptor::dimension |
Dimension of each vector (d).
Definition at line 81 of file xvec_ivf_rabitq.h.
| xvecDistanceType xvecIvfRaBitQDescriptor::distanceType |
Distance metric (L2 or DOT_PRODUCT).
Definition at line 84 of file xvec_ivf_rabitq.h.
| const uint8_t* xvecIvfRaBitQDescriptor::exCodes |
Ex-bit codes grouped by cluster [numVectors * exCodeSize].
Required when nbBits > 1, ignored otherwise.
Definition at line 101 of file xvec_ivf_rabitq.h.
| uint32_t xvecIvfRaBitQDescriptor::exCodeSize |
Bytes of ex-bit code per vector; must equal (dimension * (nbBits - 1) + 7) / 8.
Ignored when nbBits <= 1.
Definition at line 99 of file xvec_ivf_rabitq.h.
| const xvecFloat32* xvecIvfRaBitQDescriptor::exFactors |
Three factors per vector [numVectors * 3], grouped by cluster: {fError, fAddEx, fRescaleEx} for each vector.
Required when nbBits > 1, ignored otherwise.
Definition at line 103 of file xvec_ivf_rabitq.h.
| const xvecFloat32* xvecIvfRaBitQDescriptor::factors |
Two factors per vector [numVectors * 2], grouped by cluster: {orMinusCL2sqr, dpMultiplier} for each vector.
Definition at line 90 of file xvec_ivf_rabitq.h.
| const xvecVectorIdType* xvecIvfRaBitQDescriptor::ids |
Original id per vector [numVectors], in the same grouped order.
May be NULL, in which case sequential ids are used.
Definition at line 92 of file xvec_ivf_rabitq.h.
| const xvecVectorIdType* xvecIvfRaBitQDescriptor::listSizes |
Vectors per cluster [numClusters]; entries sum to numVectors.
Definition at line 88 of file xvec_ivf_rabitq.h.
| uint8_t xvecIvfRaBitQDescriptor::nbBits |
Bits per dimension: 1 sign bit + (nbBits - 1) magnitude bits.
0 and 1 both mean a sign-bit-only index. Maximum 9.
Definition at line 97 of file xvec_ivf_rabitq.h.
| xvecClusterIdType xvecIvfRaBitQDescriptor::numClusters |
Number of IVF clusters (nlist).
Definition at line 82 of file xvec_ivf_rabitq.h.
| xvecVectorIdType xvecIvfRaBitQDescriptor::numVectors |
Total number of vectors; must equal the sum of listSizes.
Definition at line 83 of file xvec_ivf_rabitq.h.