[mlpack-svn] r15046 - mlpack/trunk/src/mlpack/core/math

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri May 10 15:20:36 EDT 2013


Author: rcurtin
Date: 2013-05-10 15:20:36 -0400 (Fri, 10 May 2013)
New Revision: 15046

Modified:
   mlpack/trunk/src/mlpack/core/math/range_impl.hpp
Log:
A commit from a long time ago shows I committed the Contains() function without
testing it, and, well, sure enough, it's a failure.  This (hopefully) fixes it.


Modified: mlpack/trunk/src/mlpack/core/math/range_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/math/range_impl.hpp	2013-05-10 18:23:29 UTC (rev 15045)
+++ mlpack/trunk/src/mlpack/core/math/range_impl.hpp	2013-05-10 19:20:36 UTC (rev 15046)
@@ -171,8 +171,9 @@
  */
 inline bool Range::Contains(const Range& r) const
 {
-  return lo <= r.hi;
+  return lo <= r.hi && hi >= r.lo;
 }
+
 /**
  * Returns a string representation of an object.
  */




More information about the mlpack-svn mailing list