[mlpack-svn] r15083 - in mlpack/trunk/src/mlpack: core/metrics methods/fastmks
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon May 13 17:34:38 EDT 2013
Author: rcurtin
Date: 2013-05-13 17:34:37 -0400 (Mon, 13 May 2013)
New Revision: 15083
Modified:
mlpack/trunk/src/mlpack/core/metrics/ip_metric.hpp
mlpack/trunk/src/mlpack/core/metrics/ip_metric_impl.hpp
mlpack/trunk/src/mlpack/methods/fastmks/fastmks.hpp
mlpack/trunk/src/mlpack/methods/fastmks/fastmks_main.cpp
Log:
Move IPMetric to mlpack::metric not mlpack::fastmks.
Modified: mlpack/trunk/src/mlpack/core/metrics/ip_metric.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/metrics/ip_metric.hpp 2013-05-13 21:30:31 UTC (rev 15082)
+++ mlpack/trunk/src/mlpack/core/metrics/ip_metric.hpp 2013-05-13 21:34:37 UTC (rev 15083)
@@ -9,7 +9,7 @@
#define __MLPACK_METHODS_FASTMKS_IP_METRIC_HPP
namespace mlpack {
-namespace fastmks /** Fast maximum kernel search. */ {
+namespace metric {
template<typename KernelType>
class IPMetric
@@ -42,7 +42,7 @@
KernelType& kernel;
};
-}; // namespace fastmks
+}; // namespace metric
}; // namespace mlpack
// Include implementation.
Modified: mlpack/trunk/src/mlpack/core/metrics/ip_metric_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/metrics/ip_metric_impl.hpp 2013-05-13 21:30:31 UTC (rev 15082)
+++ mlpack/trunk/src/mlpack/core/metrics/ip_metric_impl.hpp 2013-05-13 21:34:37 UTC (rev 15083)
@@ -14,7 +14,7 @@
#include <mlpack/core/kernels/linear_kernel.hpp>
namespace mlpack {
-namespace fastmks {
+namespace metric {
// Constructor with no instantiated kernel.
template<typename KernelType>
@@ -63,7 +63,7 @@
return metric::LMetric<2, true>::Evaluate(a, b);
}
-}; // namespace fastmks
+}; // namespace metric
}; // namespace mlpack
#endif
Modified: mlpack/trunk/src/mlpack/methods/fastmks/fastmks.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/fastmks/fastmks.hpp 2013-05-13 21:30:31 UTC (rev 15082)
+++ mlpack/trunk/src/mlpack/methods/fastmks/fastmks.hpp 2013-05-13 21:34:37 UTC (rev 15083)
@@ -48,7 +48,7 @@
*/
template<
typename KernelType,
- typename TreeType = tree::CoverTree<IPMetric<KernelType>,
+ typename TreeType = tree::CoverTree<metric::IPMetric<KernelType>,
tree::FirstPointIsRoot, FastMKSStat>
>
class FastMKS
@@ -175,9 +175,9 @@
arma::mat& products);
//! Get the inner-product metric induced by the given kernel.
- const IPMetric<KernelType>& Metric() const { return metric; }
+ const metric::IPMetric<KernelType>& Metric() const { return metric; }
//! Modify the inner-product metric induced by the given kernel.
- IPMetric<KernelType>& Metric() { return metric; }
+ metric::IPMetric<KernelType>& Metric() { return metric; }
private:
//! The reference dataset.
@@ -200,7 +200,7 @@
bool naive;
//! The instantiated inner-product metric induced by the given kernel.
- IPMetric<KernelType> metric;
+ metric::IPMetric<KernelType> metric;
//! Utility function. Copied too many times from too many places.
void InsertNeighbor(arma::Mat<size_t>& indices,
Modified: mlpack/trunk/src/mlpack/methods/fastmks/fastmks_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/fastmks/fastmks_main.cpp 2013-05-13 21:30:31 UTC (rev 15082)
+++ mlpack/trunk/src/mlpack/methods/fastmks/fastmks_main.cpp 2013-05-13 21:34:37 UTC (rev 15083)
@@ -20,6 +20,7 @@
using namespace mlpack::fastmks;
using namespace mlpack::kernel;
using namespace mlpack::tree;
+using namespace mlpack::metric;
PROGRAM_INFO("FastMKS (Fast Max-Kernel Search)",
"This program will find the k maximum kernel of a set of points, "
More information about the mlpack-svn
mailing list