From 42a94dbf970ea03a89caad7f33dc5f18c4d1d032 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 22 Dec 2015 23:25:57 -0500 Subject: [PATCH] Fix bugs; add KernelType(). --- src/mlpack/methods/fastmks/fastmks_model.hpp | 9 +++++++-- src/mlpack/methods/fastmks/fastmks_model_impl.hpp | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mlpack/methods/fastmks/fastmks_model.hpp b/src/mlpack/methods/fastmks/fastmks_model.hpp index 4289d4bca3..5226912985 100644 --- a/src/mlpack/methods/fastmks/fastmks_model.hpp +++ b/src/mlpack/methods/fastmks/fastmks_model.hpp @@ -44,9 +44,9 @@ class FastMKSModel * Build the model on the given reference set. Make sure kernelType is equal * to the correct entry in KernelTypes for the given KernelType class! */ - template + template void BuildModel(const arma::mat& referenceData, - KernelType& kernel, + TKernelType& kernel, const bool singleMode, const bool naive, const double base); @@ -61,6 +61,11 @@ class FastMKSModel //! Set whether or not single-tree search is used. bool& SingleMode(); + //! Get the kernel type. + int KernelType() const { return kernelType; } + //! Modify the kernel type. + int& KernelType() { return kernelType; } + /** * Search with a different query set. * diff --git a/src/mlpack/methods/fastmks/fastmks_model_impl.hpp b/src/mlpack/methods/fastmks/fastmks_model_impl.hpp index 00534c7528..e70f8c077e 100644 --- a/src/mlpack/methods/fastmks/fastmks_model_impl.hpp +++ b/src/mlpack/methods/fastmks/fastmks_model_impl.hpp @@ -49,9 +49,9 @@ void BuildFastMKSModel(FastMKSType& /* f */, " not equal to kernel type of the model!"); } -template +template void FastMKSModel::BuildModel(const arma::mat& referenceData, - KernelType& kernel, + TKernelType& kernel, const bool singleMode, const bool naive, const double base)