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

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Dec 13 05:21:18 EST 2011


Author: rcurtin
Date: 2011-12-13 05:21:18 -0500 (Tue, 13 Dec 2011)
New Revision: 10743

Modified:
   mlpack/trunk/src/mlpack/tests/kmeans_test.cpp
Log:
Explicit conversion to mat.


Modified: mlpack/trunk/src/mlpack/tests/kmeans_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/kmeans_test.cpp	2011-12-13 10:01:14 UTC (rev 10742)
+++ mlpack/trunk/src/mlpack/tests/kmeans_test.cpp	2011-12-13 10:21:18 UTC (rev 10743)
@@ -54,7 +54,7 @@
   KMeans<> kmeans; // No overclustering.
 
   arma::Col<size_t> assignments;
-  kmeans.Cluster(trans(kMeansData), 3, assignments);
+  kmeans.Cluster((arma::mat) trans(kMeansData), 3, assignments);
 
   // Now make sure we got it all right.  There is no restriction on how the
   // clusters are ordered, so we have to be careful about that.
@@ -89,7 +89,7 @@
   KMeans<> kmeans(1000, 4.0); // Overclustering factor of 4.0.
 
   arma::Col<size_t> assignments;
-  kmeans.Cluster(trans(kMeansData), 3, assignments);
+  kmeans.Cluster((arma::mat) trans(kMeansData), 3, assignments);
 
   // Now make sure we got it all right.  There is no restriction on how the
   // clusters are ordered, so we have to be careful about that.




More information about the mlpack-svn mailing list