14 #ifndef __MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP 15 #define __MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP 54 template<
typename TKernelType>
55 void BuildModel(
const arma::mat& referenceData,
57 const bool singleMode,
88 void Search(
const arma::mat& querySet,
90 arma::Mat<size_t>& indices,
103 void Search(
const size_t k,
104 arma::Mat<size_t>& indices,
110 template<
typename Archive>
111 void Serialize(Archive& ar,
const unsigned int );
133 template<
typename FastMKSType>
134 void Search(FastMKSType& f,
135 const arma::mat& querySet,
137 arma::Mat<size_t>& indices,
145 #include "fastmks_model_impl.hpp"
bool Naive() const
Get whether or not naive search is used.
Linear algebra utility functions, generally performed on matrices or vectors.
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.
~FastMKSModel()
Clean memory.
FastMKS< kernel::HyperbolicTangentKernel > * hyptan
This will only be non-NULL if this is the type of kernel we are using.
bool SingleMode() const
Get whether or not single-tree search is used.
FastMKS< kernel::TriangularKernel > * triangular
This will only be non-NULL if this is the type of kernel we are using.
FastMKS< kernel::GaussianKernel > * gaussian
This will only be non-NULL if this is the type of kernel we are using.
FastMKS< kernel::PolynomialKernel > * polynomial
This will only be non-NULL if this is the type of kernel we are using.
int & KernelType()
Modify the kernel type.
FastMKS< kernel::EpanechnikovKernel > * epan
This will only be non-NULL if this is the type of kernel we are using.
A utility struct to contain all the possible FastMKS models, for use by the mlpack_fastmks program...
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
void BuildModel(const arma::mat &referenceData, TKernelType &kernel, const bool singleMode, const bool naive, const double base)
Build the model on the given reference set.
FastMKS< kernel::CosineDistance > * cosine
This will only be non-NULL if this is the type of kernel we are using.
int KernelType() const
Get the kernel type.
KernelTypes
A list of all the kernels we support.
void Serialize(Archive &ar, const unsigned int)
Serialize the model.
int kernelType
The type of kernel we are using.
FastMKS< kernel::LinearKernel > * linear
This will only be non-NULL if this is the type of kernel we are using.
FastMKSModel(const int kernelType=LINEAR_KERNEL)
Create the FastMKSModel with the given kernel type.