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

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Jul 10 16:59:15 EDT 2012


Author: rcurtin
Date: 2012-07-10 16:59:15 -0400 (Tue, 10 Jul 2012)
New Revision: 13199

Modified:
   mlpack/trunk/src/mlpack/methods/det/dtree.hpp
   mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp
Log:
Yeah, this is simple enough to inline; probably a better choice.


Modified: mlpack/trunk/src/mlpack/methods/det/dtree.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/det/dtree.hpp	2012-07-10 20:56:39 UTC (rev 13198)
+++ mlpack/trunk/src/mlpack/methods/det/dtree.hpp	2012-07-10 20:59:15 UTC (rev 13199)
@@ -145,7 +145,7 @@
   ////////////////////// Private Functions ////////////////////////////////////
  private:
 
-  double LogNegativeError(size_t total_points);
+  inline double LogNegativeError(size_t total_points);
 
   bool FindSplit_(MatType* 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-10 20:56:39 UTC (rev 13198)
+++ mlpack/trunk/src/mlpack/methods/det/dtree_impl.hpp	2012-07-10 20:59:15 UTC (rev 13199)
@@ -18,7 +18,7 @@
 // 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>
-double DTree<eT, cT>::LogNegativeError(size_t total_points)
+inline double DTree<eT, cT>::LogNegativeError(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