12#ifndef MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP
13#define MLPACK_METHODS_FASTMKS_FASTMKS_MODEL_HPP
72 template<
typename TKernelType>
75 const bool singleMode,
108 arma::Mat<size_t>& indices,
122 arma::Mat<size_t>& indices,
128 template<
typename Archive>
151 template<
typename FastMKSType>
152 void Search(FastMKSType& f,
153 const arma::mat& querySet,
155 arma::Mat<size_t>& indices,
163#include "fastmks_model_impl.hpp"
A utility struct to contain all the possible FastMKS models, for use by the mlpack_fastmks program.
KernelTypes
A list of all the kernels we support.
bool Naive() const
Get whether or not naive search is used.
bool SingleMode() const
Get whether or not single-tree search is used.
FastMKSModel(const int kernelType=LINEAR_KERNEL)
Create the FastMKSModel with the given kernel type.
FastMKSModel & operator=(const FastMKSModel &other)
Copy assignment operator.
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.
bool & Naive()
Set whether or not naive search is used.
int KernelType() const
Get the kernel type.
bool & SingleMode()
Set whether or not single-tree search is used.
int & KernelType()
Modify the kernel type.
FastMKSModel(const FastMKSModel &other)
Copy constructor.
void serialize(Archive &ar, const unsigned int)
Serialize the model.
void Search(const size_t k, arma::Mat< size_t > &indices, arma::mat &kernels)
Search with the reference set as the query set.
FastMKSModel(FastMKSModel &&other)
Move constructor.
void BuildModel(arma::mat &&referenceData, TKernelType &kernel, const bool singleMode, const bool naive, const double base)
Build the model on the given reference set.
An implementation of fast exact max-kernel search.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.