[Earthmovdist-commits] r29 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Oct 14 20:52:06 CEST 2010


Author: edd
Date: 2010-10-14 20:52:05 +0200 (Thu, 14 Oct 2010)
New Revision: 29

Modified:
   pkg/src/emdL1_R.cpp
Log:
return a named vector (of length 1), not just just the value


Modified: pkg/src/emdL1_R.cpp
===================================================================
--- pkg/src/emdL1_R.cpp	2010-10-14 17:07:40 UTC (rev 28)
+++ pkg/src/emdL1_R.cpp	2010-10-14 18:52:05 UTC (rev 29)
@@ -45,8 +45,7 @@
 		break;
 	}
 
-	//return Rcpp::NumericVector::create(Rcpp::Named("dist", Rcpp::wrap(d)));
-	return Rcpp::wrap(d);
+	return Rcpp::NumericVector::create(Rcpp::Named("dist", d));
 
     } catch(std::exception &ex) { 
         forward_exception_to_r(ex); 



More information about the Earthmovdist-commits mailing list