knncolle
Collection of KNN methods in C++
|
Wrapper around a prebuilt index with L2 normalization. More...
#include <L2Normalized.hpp>
Public Member Functions | |
L2NormalizedPrebuilt (std::unique_ptr< Prebuilt< Dim_, Index_, Float_ > > prebuilt) | |
std::unique_ptr< Searcher< Index_, Float_ > > | initialize () const |
Public Member Functions inherited from knncolle::Prebuilt< Dim_, Index_, Float_ > | |
virtual Index_ | num_observations () const =0 |
virtual Dim_ | num_dimensions () const =0 |
Wrapper around a prebuilt index with L2 normalization.
This class's unique_raw()
method creates a Searcher
instance that L2-normalizes each query vector, typically for calculation of cosine distances. Instances of this class are typically constructed with L2NormalizedBuilder::unique_raw()
.
Index_ | Integer type for the indices. For the output of Builder::build , this is set to MockMatrix::index_type . |
Float_ | Floating point type for the query data and output distances. |
|
inline |
prebuilt | Pointer to a Prebuilt instance for the neighbor search that is to be wrapped. |
|
inlinevirtual |
Creates a L2NormalizedSearcher
instance.
Implements knncolle::Prebuilt< Dim_, Index_, Float_ >.