12 #ifndef MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP 13 #define MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP 75 template<
typename TKernelType>
78 const bool singleMode,
109 void Search(
const arma::mat& querySet,
111 arma::Mat<size_t>& indices,
124 void Search(
const size_t k,
125 arma::Mat<size_t>& indices,
131 template<
typename Archive>
132 void serialize(Archive& ar,
const uint32_t );
154 template<
typename FastMKSType>
155 void Search(FastMKSType& f,
156 const arma::mat& querySet,
158 arma::Mat<size_t>& indices,
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Search(const arma::mat &querySet, const size_t k, arma::Mat< size_t > &indices, arma::mat &kernels, const double base)
Search with a different query set.
Definition: fastmks_model.cpp:250
FastMKSModel(const int kernelType=LINEAR_KERNEL)
Create the FastMKSModel with the given kernel type.
Definition: fastmks_model.cpp:18
int KernelType() const
Get the kernel type.
Definition: fastmks_model.hpp:93
void BuildModel(arma::mat &&referenceData, TKernelType &kernel, const bool singleMode, const bool naive, const double base)
Build the model on the given reference set.
Definition: fastmks_model_impl.hpp:64
bool Naive() const
Get whether or not naive search is used.
Definition: fastmks_model.cpp:158
FastMKSModel & operator=(const FastMKSModel &other)
Copy assignment operator.
Definition: fastmks_model.cpp:72
bool SingleMode() const
Get whether or not single-tree search is used.
Definition: fastmks_model.cpp:204
int & KernelType()
Modify the kernel type.
Definition: fastmks_model.hpp:95
A utility struct to contain all the possible FastMKS models, for use by the mlpack_fastmks program...
Definition: fastmks_model.hpp:34
KernelTypes
A list of all the kernels we support.
Definition: fastmks_model.hpp:38
An implementation of fast exact max-kernel search.
Definition: fastmks.hpp:63
void serialize(Archive &ar, const uint32_t)
Serialize the model.
Definition: fastmks_model_impl.hpp:135
~FastMKSModel()
Clean memory.
Definition: fastmks_model.cpp:139