[Rcpp-commits] r2099 - in pkg/RcppArmadillo: . inst inst/include/RcppArmadillo inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 10 14:39:00 CEST 2010


Author: romain
Date: 2010-09-10 14:39:00 +0200 (Fri, 10 Sep 2010)
New Revision: 2099

Modified:
   pkg/RcppArmadillo/NEWS
   pkg/RcppArmadillo/inst/ChangeLog
   pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
   pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
Log:
update to armadillo 0.9.70 ready

Modified: pkg/RcppArmadillo/NEWS
===================================================================
--- pkg/RcppArmadillo/NEWS	2010-09-10 12:03:21 UTC (rev 2098)
+++ pkg/RcppArmadillo/NEWS	2010-09-10 12:39:00 UTC (rev 2099)
@@ -1,3 +1,11 @@
+0.2.6   (future)
+
+    o   Upgraded to Armadillo 0.9.70 "Subtropical Winter Safari"
+    
+    o	arma::Mat, arma::Row and arma::Col get constructor that take vector
+    	or matrix sugar expressions. See the unit test "test.armadillo.sugar.ctor" 
+    	and "test.armadillo.sugar.matrix.ctor" for examples.
+
 0.2.5   2010-08-05
 
     o   Upgraded to Armadillo 0.9.60 "Killer Bush Turkey"

Modified: pkg/RcppArmadillo/inst/ChangeLog
===================================================================
--- pkg/RcppArmadillo/inst/ChangeLog	2010-09-10 12:03:21 UTC (rev 2098)
+++ pkg/RcppArmadillo/inst/ChangeLog	2010-09-10 12:39:00 UTC (rev 2099)
@@ -1,3 +1,7 @@
+2010-09-10   Romain Francois <romain at r-enthusiasts.com>
+
+	* inst/include/* : update to armadillo 0.9.70
+
 2010-08-18   Romain Francois <romain at r-enthusiasts.com>
 
 	* inst/include/armadillo_bits/Mat_meat.hpp : not so intrusive patch that allows

Modified: pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h	2010-09-10 12:03:21 UTC (rev 2098)
+++ pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h	2010-09-10 12:39:00 UTC (rev 2099)
@@ -25,9 +25,11 @@
 template <typename eT>
 template <int RTYPE, bool NA, typename VECTOR>
 inline Mat<eT>::Mat( const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X ) 
-	: n_rows( 0 )
-	, n_cols( 0 )
-	, n_elem( 0 )
+	: n_rows(0)
+	, n_cols(0)
+	, n_elem(0)
+	, vec_state(1)
+	, mem_state(0)
 	, mem(mem)
 {
 	
@@ -37,8 +39,8 @@
 	// std::complex<double> != Rcomplex
 	isnt_same_type<eT, typename Rcpp::traits::storage_type<RTYPE>::type >::check();
   	
-	set_size( X.size(), 1 ) ;
-		
+	set_size(X.size(), 1);
+	
 	eT* ptr = memptr() ;
 	for( u32 i=0; i<n_elem; ++i){
 		ptr[i] = X[i] ;
@@ -51,6 +53,8 @@
 	: n_rows( 0 )
 	, n_cols( 0 )
 	, n_elem( 0 )
+	, vec_state(0)
+	, mem_state(0)
 	, mem(mem)
 {
 	

Modified: pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R
===================================================================
--- pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R	2010-09-10 12:03:21 UTC (rev 2098)
+++ pkg/RcppArmadillo/inst/unitTests/runit.RcppArmadillo.R	2010-09-10 12:39:00 UTC (rev 2099)
@@ -308,7 +308,7 @@
 	arma::colvec co = outer( xx, yy, ::norm ) ;
 	arma::rowvec ro = outer( yy, xx, ::norm ) ;
     return List::create( 
-    	_["mat"] = m + m, 
+    	_["mat"] = m + m , 
     	_["rowvec"] = ro, 
     	_["colvec"] = co 
     ); 



More information about the Rcpp-commits mailing list