10#ifndef SFM_NEAREST_NEIGHBOR_HEADER
11#define SFM_NEAREST_NEIGHBOR_HEADER
15#define ENABLE_SSE2_NN_SEARCH 1
16#define ENABLE_SSE3_NN_SEARCH 1
61 void set_elements (T
const* elements);
63 void set_element_dimensions (
int element_dimensions);
65 void set_num_elements (
int num_elements);
69 int get_element_dimensions (
void)
const;
92 this->elements = elements;
99 this->dimensions = element_dimensions;
106 this->num_elements = num_elements;
113 return this->dimensions;
Nearest (and second nearest) neighbor search for normalized vectors.
void set_element_dimensions(int element_dimensions)
For SfM, this is the descriptor length.
void find(T const *query, Result *result) const
Find the nearest neighbor of 'query'.
int get_element_dimensions(void) const
void set_elements(T const *elements)
For SfM, this is the descriptor memory block.
void set_num_elements(int num_elements)
For SfM, this is the number of descriptors.
#define SFM_NAMESPACE_END
#define SFM_NAMESPACE_BEGIN
Unlike the naming suggests, these are square distances.