Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Public Attributes | List of all members
faiss::ReconstructFromNeighbors Struct Reference

## Public Types
typedef Index::idx_t | idx_t
typedef HNSW::storage_idx_t | storage_idx_t

## Public Member Functions
| ReconstructFromNeighbors (const IndexHNSW &index, size_t k=256, size_t nsq=1)
void | add_codes (size_t n, const float *x)
size_t | compute_distances (size_t n, const idx_t *shortlist, const float *query, float *distances) const
void | estimate_code (const float *x, storage_idx_t i, uint8_t *code) const
| called by add_codes
void | reconstruct (storage_idx_t i, float *x, float *tmp) const
| called by compute_distances
void | reconstruct_n (storage_idx_t n0, storage_idx_t ni, float *x) const
void | get_neighbor_table (storage_idx_t i, float *out) const
| get the M+1 -by-d table for neighbor coordinates for vector i

## Public Attributes
const IndexHNSW & | index
size_t | M
size_t | k
size_t | nsq
size_t | code_size
int | k_reorder
std::vector< float > | codebook
std::vector< uint8_t > | codes
size_t | ntotal
size_t | d
size_t | dsub

## Detailed Description

Definition at line 25 of file IndexHNSW.h.

## Member Function Documentation

void faiss::ReconstructFromNeighbors::add_codes | ( | size_t | n,
|  | const float * | x
| ) |  |

codes must be added in the correct order and the IndexHNSW must be populated and sorted

Definition at line 842 of file IndexHNSW.cpp.

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

- /data/users/hoss/faiss/IndexHNSW.h
- /data/users/hoss/faiss/IndexHNSW.cpp