Faiss

- Main Page
- Namespaces
- Classes
- Files

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

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

`#include <IndexHNSW.h>`

Inheritance diagram for faiss::IndexHNSWFlat:

## Public Member Functions
| IndexHNSWFlat (int d, int M)
HNSW::DistanceComputer * | get_distance_computer () const override
Public Member Functions inherited from faiss::IndexHNSW
| IndexHNSW (int d=0, int M=32)
| IndexHNSW (Index *storage, int M=32)
void | add (idx_t n, const float *x) override
void | train (idx_t n, const float *x) override
| Trains the storage if needed.
void | search (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override
| entry point for search
void | reconstruct (idx_t key, float *recons) const override
void | reset () override
| removes all elements from the database.
void | shrink_level_0_neighbors (int size)
void | search_level_0 (idx_t n, const float *x, idx_t k, const storage_idx_t *nearest, const float *nearest_d, float *distances, idx_t *labels, int nprobe=1, int search_type=1) const
void | init_level_0_from_knngraph (int k, const float *D, const idx_t *I)
| alternative graph building
void | init_level_0_from_entry_points (int npt, const storage_idx_t *points, const storage_idx_t *nearests)
| alternative graph building
void | reorder_links ()
void | link_singletons ()
Public Member Functions inherited from faiss::Index
| Index (idx_t d=0, MetricType metric=METRIC_L2)
virtual void | add_with_ids (idx_t n, const float *x, const long *xids)
virtual void | range_search (idx_t n, const float *x, float radius, RangeSearchResult *result) const
void | assign (idx_t n, const float *x, idx_t *labels, idx_t k=1)
virtual long | remove_ids (const IDSelector &sel)
virtual void | reconstruct_n (idx_t i0, idx_t ni, float *recons) const
virtual void | search_and_reconstruct (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels, float *recons) const
void | compute_residual (const float *x, float *residual, idx_t key) const
void | display () const

## Additional Inherited Members
Public Types inherited from faiss::IndexHNSW
typedef HNSW::storage_idx_t | storage_idx_t
Public Types inherited from faiss::Index
typedef long | idx_t
| all indices are this type
Public Attributes inherited from faiss::IndexHNSW
HNSW | hnsw
bool | own_fields
Index * | storage
ReconstructFromNeighbors * | reconstruct_from_neighbors
Public Attributes inherited from faiss::Index
int | d
| vector dimension
idx_t | ntotal
| total nb of indexed vectors
bool | verbose
| verbosity level
bool | is_trained
| set if the Index does not require training, or if training is done already
MetricType | metric_type
| type of metric this index uses for search

## Detailed Description

Flat index topped with with a HNSW structure to access elements more efficiently.

Definition at line 283 of file IndexHNSW.h.

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

- /data/users/matthijs/github_faiss/faiss/IndexHNSW.h
- /data/users/matthijs/github_faiss/faiss/IndexHNSW.cpp