|
XVector
|
RAII wrapper for xvecKnnExactIndexTag. More...
#include <xvec_knn_exact_index.hpp>
Public Member Functions | |
| virtual | ~KnnExactIndex () |
| KnnExactIndex (KnnExactIndex &&other) noexcept | |
| KnnExactIndex & | operator= (KnnExactIndex &&other) noexcept |
| KnnExactIndex (const KnnExactIndex &)=delete | |
| KnnExactIndex & | operator= (const KnnExactIndex &)=delete |
| xvecKnnExactIndexTag * | handle () const noexcept |
| Get the underlying C API handle. More... | |
Static Public Member Functions | |
| static KnnExactIndex | fromRawVectors (xvecExecutionContextTag *context, const xvecFloat32 *vectors, xvecVectorIdType vectorCount, xvecDimensionType dimension, xvecDistanceType distanceType) |
| Load a KNN index from raw float32 vectors. More... | |
| static KnnExactIndex | fromFaissFile (xvecExecutionContextTag *context, const std::string &path) |
| Load a KNN index from a Faiss file. More... | |
RAII wrapper for xvecKnnExactIndexTag.
Manages the lifetime of a KNN index. The index is loaded via named factory methods and destroyed in the destructor. Supports move semantics but not copying.
Definition at line 57 of file xvec_knn_exact_index.hpp.
|
virtual |
|
noexcept |
|
delete |
|
static |
Load a KNN index from a Faiss file.
| context | Execution context handle (not owned). |
| path | Path to the Faiss index file (.faiss). |
| xvec::Error | if loading fails. |
|
static |
Load a KNN index from raw float32 vectors.
| context | Execution context handle (not owned). |
| vectors | Pointer to row-major float32 vectors. |
| vectorCount | Number of vectors. |
| dimension | Dimension of each vector. |
| distanceType | Distance metric. |
| xvec::Error | if loading fails. |
|
noexcept |
Get the underlying C API handle.
|
delete |
|
noexcept |