[mlpack-svn] r14397 - mlpack/trunk/src/mlpack/core/tree
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Feb 26 17:41:43 EST 2013
Author: rcurtin
Date: 2013-02-26 17:41:43 -0500 (Tue, 26 Feb 2013)
New Revision: 14397
Modified:
mlpack/trunk/src/mlpack/core/tree/statistic.hpp
Log:
Simplify constructors; we don't use any of the odd ones.
Modified: mlpack/trunk/src/mlpack/core/tree/statistic.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/tree/statistic.hpp 2013-02-26 18:19:33 UTC (rev 14396)
+++ mlpack/trunk/src/mlpack/core/tree/statistic.hpp 2013-02-26 22:41:43 UTC (rev 14397)
@@ -19,39 +19,19 @@
class EmptyStatistic
{
public:
- EmptyStatistic() {}
- ~EmptyStatistic() {}
+ EmptyStatistic() { }
+ ~EmptyStatistic() { }
/**
- * This constructor is called when a leaf is created.
+ * This constructor is called when a node is finished being created. The
+ * node is finished, and its children are finished, but it is not
+ * necessarily true that the statistics of other nodes are initialized yet.
*
- * @param dataset Matrix that the tree is being built on.
- * @param begin Starting index corresponding to this leaf.
- * @param count Number of points held in this leaf.
+ * @param node Node which this corresponds to.
*/
- template<typename MatType>
- EmptyStatistic(const MatType& /* dataset */,
- const size_t /* begin */,
- const size_t /* count */)
- { }
+ template<typename TreeType>
+ EmptyStatistic(TreeType& /* node */) { }
- /**
- * This constructor is called when a non-leaf node is created.
- * This lets you build fast bottom-up statistics when building trees.
- *
- * @param dataset Matrix that the tree is being built on.
- * @param begin Starting index corresponding to this leaf.
- * @param count Number of points held in this leaf.
- * @param leftStat EmptyStatistic object of the left child node.
- * @param rightStat EmptyStatistic object of the right child node.
- */
- template<typename MatType>
- EmptyStatistic(const MatType& /* dataset */,
- const size_t /* start */,
- const size_t /* count */,
- const EmptyStatistic& /* leftStat */,
- const EmptyStatistic& /* rightStat */)
- { }
public:
/**
* Returns a string representation of this object.
More information about the mlpack-svn
mailing list