[mlpack-svn] r13873 - mlpack/trunk/src/mlpack/methods/nca

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Nov 15 21:36:21 EST 2012


Author: rcurtin
Date: 2012-11-15 21:36:21 -0500 (Thu, 15 Nov 2012)
New Revision: 13873

Modified:
   mlpack/trunk/src/mlpack/methods/nca/nca_main.cpp
Log:
Fix to work with older GCC versions in cases where math:: is ambiguous (stop
using arma::).


Modified: mlpack/trunk/src/mlpack/methods/nca/nca_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/nca/nca_main.cpp	2012-11-16 01:08:57 UTC (rev 13872)
+++ mlpack/trunk/src/mlpack/methods/nca/nca_main.cpp	2012-11-16 02:36:21 UTC (rev 13873)
@@ -61,7 +61,6 @@
 using namespace mlpack::nca;
 using namespace mlpack::metric;
 using namespace std;
-using namespace arma;
 
 int main(int argc, char* argv[])
 {
@@ -84,11 +83,11 @@
   const bool shuffle = !CLI::HasParam("linear_scan");
 
   // Load data.
-  mat data;
+  arma::mat data;
   data::Load(inputFile.c_str(), data, true);
 
   // Do we want to load labels separately?
-  umat labels(data.n_cols, 1);
+  arma::umat labels(data.n_cols, 1);
   if (labelsFile != "")
   {
     data::Load(labelsFile.c_str(), labels, true);
@@ -107,7 +106,7 @@
     data.shed_row(data.n_rows - 1);
   }
 
-  mat distance;
+  arma::mat distance;
 
   // Normalize the data, if necessary.
   if (normalize)




More information about the mlpack-svn mailing list