[mlpack-svn] r10327 - mlpack/trunk/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Nov 18 18:07:16 EST 2011
Author: rcurtin
Date: 2011-11-18 18:07:15 -0500 (Fri, 18 Nov 2011)
New Revision: 10327
Modified:
mlpack/trunk/src/mlpack/tests/gmm_test.cpp
Log:
Fix some warnings I inadvertently introduced.
Modified: mlpack/trunk/src/mlpack/tests/gmm_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/gmm_test.cpp 2011-11-18 21:47:35 UTC (rev 10326)
+++ mlpack/trunk/src/mlpack/tests/gmm_test.cpp 2011-11-18 23:07:15 UTC (rev 10327)
@@ -205,7 +205,7 @@
// Build each Gaussian individually.
size_t point = 0;
- for (int i = 0; i < gaussians; i++)
+ for (size_t i = 0; i < gaussians; i++)
{
arma::mat gaussian;
gaussian.randn(dims, counts[i]);
@@ -241,16 +241,16 @@
arma::uvec sort_try = sort_index(gmm.Weights());
// Check the model to see that it is correct.
- for (int i = 0; i < gaussians; i++)
+ for (size_t i = 0; i < gaussians; i++)
{
// Check the mean.
- for (int j = 0; j < dims; j++)
+ for (size_t j = 0; j < dims; j++)
BOOST_REQUIRE_CLOSE((gmm.Means()[sort_try[i]])[j],
(means[sort_ref[i]])[j], 1e-5);
// Check the covariance.
- for (int row = 0; row < dims; row++)
- for (int col = 0; col < dims; col++)
+ for (size_t row = 0; row < dims; row++)
+ for (size_t col = 0; col < dims; col++)
BOOST_REQUIRE_CLOSE((gmm.Covariances()[sort_try[i]])(row, col),
(covars[sort_ref[i]])(row, col), 1e-5);
More information about the mlpack-svn
mailing list