[mlpack-svn] r13213 - mlpack/trunk/src/mlpack/methods/det

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Jul 11 18:35:17 EDT 2012


Author: rcurtin
Date: 2012-07-11 18:35:16 -0400 (Wed, 11 Jul 2012)
New Revision: 13213

Modified:
   mlpack/trunk/src/mlpack/methods/det/dtree.hpp
   mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp
Log:
Minor style fixes and const-correctness fixes.


Modified: mlpack/trunk/src/mlpack/methods/det/dtree.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/det/dtree.hpp	2012-07-11 22:34:09 UTC (rev 13212)
+++ mlpack/trunk/src/mlpack/methods/det/dtree.hpp	2012-07-11 22:35:16 UTC (rev 13213)
@@ -145,7 +145,7 @@
   ////////////////////// Private Functions ////////////////////////////////////
  private:
 
-  inline double LogNegativeError(size_t total_points);
+  inline double LogNegativeError(const size_t total_points);
 
   bool FindSplit_(const arma::mat& data,
                   size_t* split_dim,

Modified: mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp	2012-07-11 22:34:09 UTC (rev 13212)
+++ mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp	2012-07-11 22:35:16 UTC (rev 13213)
@@ -6,19 +6,18 @@
  * the Density Estimation Tree class.
  *
  */
-
 #ifndef __MLPACK_METHODS_DET_DTREE_IMPL_HPP
 #define __MLPACK_METHODS_DET_DTREE_IMPL_HPP
 
 #include "dtree.hpp"
 
-namespace mlpack{
+namespace mlpack
 namespace det {
 
 // This function computes the log-l2-negative-error of a given node from the
 // formula R(t) = log(|t|^2 / (N^2 V_t)).
 template<typename eT, typename cT>
-inline double DTree<eT, cT>::LogNegativeError(size_t total_points)
+inline double DTree<eT, cT>::LogNegativeError(const size_t total_points)
 {
   // log(-|t|^2 / (N^2 V_t)) = log(-1) + 2 log(|t|) - 2 log(N) - log(V_t).
   return 2 * std::log((double) (end_ - start_)) -




More information about the mlpack-svn mailing list