[mlpack-svn] r14248 - mlpack/branches/mlpack-1.x/src/mlpack/core/tree

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Feb 8 16:03:39 EST 2013


Author: rcurtin
Date: 2013-02-08 16:03:39 -0500 (Fri, 08 Feb 2013)
New Revision: 14248

Added:
   mlpack/branches/mlpack-1.x/src/mlpack/core/tree/mrkd_statistic.cpp
Modified:
   mlpack/branches/mlpack-1.x/src/mlpack/core/tree/CMakeLists.txt
Log:
Add mrkd_statistic.cpp (we forgot this, oops).


Modified: mlpack/branches/mlpack-1.x/src/mlpack/core/tree/CMakeLists.txt
===================================================================
--- mlpack/branches/mlpack-1.x/src/mlpack/core/tree/CMakeLists.txt	2013-02-08 21:00:15 UTC (rev 14247)
+++ mlpack/branches/mlpack-1.x/src/mlpack/core/tree/CMakeLists.txt	2013-02-08 21:03:39 UTC (rev 14248)
@@ -24,6 +24,7 @@
   statistic.hpp
   mrkd_statistic.hpp
   mrkd_statistic_impl.hpp
+  mrkd_statistic.cpp
 )
 
 # add directory name to sources

Copied: mlpack/branches/mlpack-1.x/src/mlpack/core/tree/mrkd_statistic.cpp (from rev 14247, mlpack/trunk/src/mlpack/core/tree/mrkd_statistic.cpp)
===================================================================
--- mlpack/branches/mlpack-1.x/src/mlpack/core/tree/mrkd_statistic.cpp	                        (rev 0)
+++ mlpack/branches/mlpack-1.x/src/mlpack/core/tree/mrkd_statistic.cpp	2013-02-08 21:03:39 UTC (rev 14248)
@@ -0,0 +1,43 @@
+/**
+ * @file mrkd_statistic.cpp
+ * @author James Cline
+ *
+ * Definition of the statistic for multi-resolution kd-trees.
+ */
+#include "mrkd_statistic.hpp"
+
+using namespace mlpack;
+using namespace mlpack::tree;
+
+MRKDStatistic::MRKDStatistic() :
+    dataset(NULL),
+    begin(0),
+    count(0),
+    leftStat(NULL),
+    rightStat(NULL),
+    parentStat(NULL)
+{ }
+
+/**
+ * Returns a string representation of this object.
+ */
+std::string MRKDStatistic::ToString() const
+{
+  std::ostringstream convert;
+
+  convert << "MRKDStatistic [" << this << std::endl;
+  convert << "begin: " << begin << std::endl;
+  convert << "count: " << count << std::endl;
+  convert << "sumOfSquaredNorms: " << sumOfSquaredNorms << std::endl;
+  if (leftStat != NULL)
+  {
+    convert << "leftStat:" << std::endl;
+    convert << mlpack::util::Indent(leftStat->ToString());
+  }
+  if (rightStat != NULL)
+  {
+    convert << "rightStat:" << std::endl;
+    convert << mlpack::util::Indent(rightStat->ToString());
+  }
+  return convert.str();
+}




More information about the mlpack-svn mailing list