Struct faiss::ZnSphereSearch
-
struct ZnSphereSearch
returns the nearest vertex in the sphere to a query. Returns only the coordinates, not an id.
Algorithm: all points are derived from a one atom vector up to a permutation and sign changes. The search function finds the most appropriate atom and transformation.
Subclassed by faiss::ZnSphereCodec
Public Functions
-
ZnSphereSearch(int dim, int r2)
-
float search(const float *x, float *c) const
find nearest centroid. x does not need to be normalized
-
float search(const float *x, float *c, float *tmp, int *tmp_int, int *ibest_out = nullptr) const
full call. Requires externally-allocated temp space
-
void search_multi(int n, const float *x, float *c_out, float *dp_out)
-
ZnSphereSearch(int dim, int r2)