[mlpack-git] master, mlpack-1.0.x: Actually print the kernel. (2d9abe7)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:42:56 EST 2015
Repository : https://github.com/mlpack/mlpack
On branches: master,mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 2d9abe7cae4a0dffbf8651539868eb5c8071b1a0
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Feb 10 13:57:44 2014 +0000
Actually print the kernel.
>---------------------------------------------------------------
2d9abe7cae4a0dffbf8651539868eb5c8071b1a0
src/mlpack/core/metrics/ip_metric_impl.hpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/core/metrics/ip_metric_impl.hpp b/src/mlpack/core/metrics/ip_metric_impl.hpp
index 6b9661b..5b46756 100644
--- a/src/mlpack/core/metrics/ip_metric_impl.hpp
+++ b/src/mlpack/core/metrics/ip_metric_impl.hpp
@@ -53,12 +53,14 @@ inline double IPMetric<KernelType>::Evaluate(const Vec1Type& a,
2 * kernel.Evaluate(a, b));
}
-// Convert Object To String
+// Convert object to string.
template<typename KernelType>
-std::string IPMetric<KernelType>::ToString() const{
+std::string IPMetric<KernelType>::ToString() const
+{
std::ostringstream convert;
convert << "IPMetric [" << this << "]" << std::endl;
- convert << " Kernel address: " << localKernel << std::endl;
+ convert << " Kernel: " << std::endl;
+ convert << util::Indent(kernel.ToString(), 2);
return convert.str();
}
More information about the mlpack-git
mailing list