[Rcpp-commits] r2139 - pkg/RcppArmadillo/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 21 17:45:00 CEST 2010


Author: edd
Date: 2010-09-21 17:45:00 +0200 (Tue, 21 Sep 2010)
New Revision: 2139

Modified:
   pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h
Log:
switch to using get_n_rows() and get_n_cols()


Modified: pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h	2010-09-21 14:34:11 UTC (rev 2138)
+++ pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h	2010-09-21 15:45:00 UTC (rev 2139)
@@ -104,8 +104,8 @@
     	   memory allocated by R */
     	template <typename T1, typename T2, typename eglue_type>
     	SEXP wrap_eglue( const arma::eGlue<T1, T2, eglue_type>& X, ::Rcpp::traits::false_type ){
-    		int n_rows = X.P1.n_rows ;
-    		int n_cols = X.P1.n_cols ;
+		int n_rows = X.P1.get_n_rows() ;
+    		int n_cols = X.P1.get_n_cols() ;
     		typedef typename ::Rcpp::Vector< ::Rcpp::traits::r_sexptype_traits< typename T1::elem_type>::rtype > VECTOR ;
     		VECTOR res(::Rcpp::Dimension( n_rows , n_cols )) ;
     		::arma::Mat<typename T1::elem_type> result( res.begin(), n_rows, n_cols, false ) ;



More information about the Rcpp-commits mailing list