|
knncolle
Collection of KNN methods in C++
|
Wrapper around a search interface with L2 normalization. More...
#include <L2Normalized.hpp>


Public Member Functions | |
| L2NormalizedSearcher (std::unique_ptr< Searcher< Index_, Normalized_, Distance_ > > searcher, std::size_t num_dimensions) | |
Public Member Functions inherited from knncolle::Searcher< Index_, Data_, Distance_ > | |
| virtual void | search (Index_ i, Index_ k, std::vector< Index_ > *output_indices, std::vector< Distance_ > *output_distances)=0 |
| virtual void | search (const Data_ *query, Index_ k, std::vector< Index_ > *output_indices, std::vector< Distance_ > *output_distances)=0 |
| virtual bool | can_search_all () const |
| virtual Index_ | search_all (Index_ i, Distance_ distance, std::vector< Index_ > *output_indices, std::vector< Distance_ > *output_distances) |
| virtual Index_ | search_all (const Data_ *query, Distance_ distance, std::vector< Index_ > *output_indices, std::vector< Distance_ > *output_distances) |
Wrapper around a search interface with L2 normalization.
This applies L2 normalization to each query vector before running search() and search_all(), typically for calculation of cosine distances. Instances of this class are typically constructed with L2NormalizedPrebuilt::initialize().
| Index_ | Integer type for the indices. |
| Data_ | Numeric type for the input and query data. |
| Distance_ | Floating-point type for the distances. |
| Normalized_ | Floating-point type for the L2-normalized data. |
|
inline |
| searcher | Pointer to a Searcher class for the neighbor search that is to be wrapped. |
| num_dimensions | Number of dimensions of the data. |