faiss.index

Undocumented in source.

Members

Aliases

FaissIDSelector
alias FaissIDSelector = FaissIDSelector_H
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FaissIndex
alias FaissIndex = FaissIndex_H
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FaissRangeSearchResult
alias FaissRangeSearchResult = FaissRangeSearchResult_H
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

FaissMetricType
enum FaissMetricType

Some algorithms support both an inner product version and a L2 search version.

Functions

faiss_Index_add
int faiss_Index_add(FaissIndex* index, idx_t n, const(float)* x)

Add n vectors of dimension d to the index.

faiss_Index_add_with_ids
int faiss_Index_add_with_ids(FaissIndex* index, idx_t n, const(float)* x, const(idx_t)* xids)

Same as add, but stores xids instead of sequential ids.

faiss_Index_assign
int faiss_Index_assign(FaissIndex* index, idx_t n, const(float)* x, idx_t* labels, idx_t k)

return the indexes of the k vectors closest to the query x.

faiss_Index_compute_residual
int faiss_Index_compute_residual(const(FaissIndex)* index, const(float)* x, float* residual, idx_t key)

Computes a residual vector after indexing encoding.

faiss_Index_compute_residual_n
int faiss_Index_compute_residual_n(const(FaissIndex)* index, idx_t n, const(float)* x, float* residuals, const(idx_t)* keys)

Computes a residual vector after indexing encoding.

faiss_Index_d
int faiss_Index_d(const(FaissIndex)* )

Getter for d

faiss_Index_free
void faiss_Index_free(FaissIndex* obj)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
faiss_Index_is_trained
int faiss_Index_is_trained(const(FaissIndex)* )

Getter for is_trained

faiss_Index_metric_type
FaissMetricType faiss_Index_metric_type(const(FaissIndex)* )

Getter for metric_type

faiss_Index_ntotal
idx_t faiss_Index_ntotal(const(FaissIndex)* )

Getter for ntotal

faiss_Index_range_search
int faiss_Index_range_search(const(FaissIndex)* index, idx_t n, const(float)* x, float radius, FaissRangeSearchResult* result)

query n vectors of dimension d to the index.

faiss_Index_reconstruct
int faiss_Index_reconstruct(const(FaissIndex)* index, idx_t key, float* recons)

Reconstruct a stored vector (or an approximation if lossy coding)

faiss_Index_reconstruct_n
int faiss_Index_reconstruct_n(const(FaissIndex)* index, idx_t i0, idx_t ni, float* recons)

Reconstruct vectors i0 to i0 + ni - 1

faiss_Index_remove_ids
int faiss_Index_remove_ids(FaissIndex* index, const(FaissIDSelector)* sel, size_t* n_removed)

removes IDs from the index. Not supported by all indexes @param index opaque pointer to index object @param nremove output for the number of IDs removed

faiss_Index_reset
int faiss_Index_reset(FaissIndex* index)

removes all elements from the database. @param index opaque pointer to index object

faiss_Index_search
int faiss_Index_search(const(FaissIndex)* index, idx_t n, const(float)* x, idx_t k, float* distances, idx_t* labels)

query n vectors of dimension d to the index.

faiss_Index_set_verbose
void faiss_Index_set_verbose(FaissIndex* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
faiss_Index_train
int faiss_Index_train(FaissIndex* index, idx_t n, const(float)* x)

Perform training on a representative set of vectors

faiss_Index_verbose
int faiss_Index_verbose(const(FaissIndex)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

FaissIDSelector_H
struct FaissIDSelector_H
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FaissIndex_H
struct FaissIndex_H

Opaque type for referencing to an index object

FaissRangeSearchResult_H
struct FaissRangeSearchResult_H

Copyright (c) Facebook, Inc. and its affiliates.

Meta