XVector
xvecIvfFlatDescriptor Struct Reference

FAISS-free description of an IVF-Flat index. More...

#include <xvec_ivf_flat.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. More...
 
const xvecFloat32 * centroids
 Cluster centroids, row-major [numClusters * dimension]. More...
 
const xvecFloat32 * vectors
 Vectors grouped by cluster, row-major [numVectors * dimension]. More...
 
const xvecVectorIdType * listSizes
 Vectors per cluster [numClusters]; entries sum to numVectors. More...
 
const xvecVectorIdType * ids
 Original id per vector [numVectors], in the same grouped order. More...
 

Detailed Description

FAISS-free description of an IVF-Flat index.

Fully describes an IVF-Flat index using plain C arrays, with no dependency on FAISS types or ABI. Vectors are grouped by cluster: the first listSizes[0] vectors belong to cluster 0, the next listSizes[1] to cluster 1, and so on.

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 73 of file xvec_ivf_flat.h.

Member Data Documentation

◆ centroids

const xvecFloat32* xvecIvfFlatDescriptor::centroids

Cluster centroids, row-major [numClusters * dimension].

Definition at line 79 of file xvec_ivf_flat.h.

◆ dimension

xvecDimensionType xvecIvfFlatDescriptor::dimension

Dimension of each vector (d).

Definition at line 75 of file xvec_ivf_flat.h.

◆ distanceType

xvecDistanceType xvecIvfFlatDescriptor::distanceType

Distance metric.

Definition at line 78 of file xvec_ivf_flat.h.

◆ ids

const xvecVectorIdType* xvecIvfFlatDescriptor::ids

Original id per vector [numVectors], in the same grouped order.

May be NULL, in which case sequential ids are used.

Definition at line 82 of file xvec_ivf_flat.h.

◆ listSizes

const xvecVectorIdType* xvecIvfFlatDescriptor::listSizes

Vectors per cluster [numClusters]; entries sum to numVectors.

Definition at line 81 of file xvec_ivf_flat.h.

◆ numClusters

xvecClusterIdType xvecIvfFlatDescriptor::numClusters

Number of IVF clusters (nlist).

Definition at line 76 of file xvec_ivf_flat.h.

◆ numVectors

xvecVectorIdType xvecIvfFlatDescriptor::numVectors

Total number of vectors; must equal the sum of listSizes.

Definition at line 77 of file xvec_ivf_flat.h.

◆ vectors

const xvecFloat32* xvecIvfFlatDescriptor::vectors

Vectors grouped by cluster, row-major [numVectors * dimension].

Definition at line 80 of file xvec_ivf_flat.h.


The documentation for this struct was generated from the following file: