[mlpack-svn] r10424 - mlpack/trunk/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Sat Nov 26 22:27:14 EST 2011


Author: rcurtin
Date: 2011-11-26 22:27:14 -0500 (Sat, 26 Nov 2011)
New Revision: 10424

Modified:
   mlpack/trunk/src/mlpack/tests/pca_test.cpp
Log:
I thought I was helping, but it turns out I just made things worse.
BOOST_REQUIRE_SMALL is necessary because the eigenvalues could be zero.  The
fabs() isn't, though.


Modified: mlpack/trunk/src/mlpack/tests/pca_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/pca_test.cpp	2011-11-27 03:22:31 UTC (rev 10423)
+++ mlpack/trunk/src/mlpack/tests/pca_test.cpp	2011-11-27 03:27:14 UTC (rev 10424)
@@ -42,7 +42,7 @@
   {
     for(int j = 0; j < n_cols; j++)
     {
-      BOOST_REQUIRE_CLOSE(eigVal(i, j), eigVal1(i, j), 1e-5);
+      BOOST_REQUIRE_SMALL(eigVal(i, j) - eigVal1(i, j), 0.0001);
     }
   }
 }




More information about the mlpack-svn mailing list