[mlpack-svn] r14041 - in mlpack/trunk/src/mlpack/core/tree: . cover_tree
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Dec 21 12:52:24 EST 2012
Author: trironk3
Date: 2012-12-21 12:52:24 -0500 (Fri, 21 Dec 2012)
New Revision: 14041
Modified:
mlpack/trunk/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp
mlpack/trunk/src/mlpack/core/tree/mrkd_statistic.hpp
Log:
Initializing MRKDStatistic's leftStat and rightStat fields and standardized cover_tree/cover_tree_impl.hpp
Modified: mlpack/trunk/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp 2012-12-21 17:06:04 UTC (rev 14040)
+++ mlpack/trunk/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp 2012-12-21 17:52:24 UTC (rev 14041)
@@ -845,7 +845,6 @@
convert << std::endl << mlpack::util::Indent(children.at(i)->ToString());
}
}
- std::cout << "returning " << this << std::endl;
return convert.str();
}
}; // namespace tree
Modified: mlpack/trunk/src/mlpack/core/tree/mrkd_statistic.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/tree/mrkd_statistic.hpp 2012-12-21 17:06:04 UTC (rev 14040)
+++ mlpack/trunk/src/mlpack/core/tree/mrkd_statistic.hpp 2012-12-21 17:52:24 UTC (rev 14041)
@@ -22,7 +22,10 @@
:
dataset(NULL),
begin(0),
- count(0)
+ count(0),
+ leftStat(NULL),
+ rightStat(NULL),
+ parentStat(NULL)
{ }
~MRKDStatistic() {}
@@ -42,6 +45,8 @@
dataset(&dataset),
begin(begin),
count(count),
+ leftStat(NULL),
+ rightStat(NULL),
parentStat(NULL)
{
centerOfMass = dataset.col(begin);
@@ -97,27 +102,22 @@
*/
std::string ToString() const
{
- std::cout << "Started " << this << std::endl;
std::ostringstream convert;
convert << "MRKDStatistic [" << this << std::endl;
convert << "begin: " << begin << std::endl;
- std::cout << " after begin " << this << std::endl;
convert << "count: " << count << std::endl;
- std::cout << " after count " << this << std::endl;
- convert << "sumOfSquaredNorms" << sumOfSquaredNorms << std::endl;
- std::cout << " after sum of squared norms" << this << std::endl;
- std::cout << "Children " << this << std::endl;
-/*
+ convert << "sumOfSquaredNorms: " << sumOfSquaredNorms << std::endl;
if (leftStat != NULL)
{
- convert << "leftStat:" << std::endl << mlpack::util::Indent(leftStat->ToString());
+ convert << "leftStat:" << std::endl;
+ convert << mlpack::util::Indent(leftStat->ToString());
}
if (rightStat != NULL)
{
- convert << "rightStat:" << std::endl << mlpack::util::Indent(rightStat->ToString());
+ convert << "rightStat:" << std::endl;
+ convert << mlpack::util::Indent(rightStat->ToString());
}
-*/
- std::cout << "Done " << this << std::endl;
+ return convert.str();
}
//! The data points this object contains
More information about the mlpack-svn
mailing list