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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 16 12:26:58 CET 2011


Author: romain
Date: 2011-11-16 12:26:57 +0100 (Wed, 16 Nov 2011)
New Revision: 3370

Modified:
   pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h
   pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h
Log:
support for wrap( GenCube )

Modified: pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h	2011-11-16 11:24:06 UTC (rev 3369)
+++ pkg/RcppArmadillo/inst/include/RcppArmadilloForward.h	2011-11-16 11:26:57 UTC (rev 3370)
@@ -77,6 +77,8 @@
     template <typename eT, typename gen_type>
     SEXP wrap( const arma::Gen<eT,gen_type>& X) ;
     
+    template<typename eT, typename gen_type>
+    SEXP wrap( const arma::GenCub<eT,gen_type>& X) ;
     
     namespace traits {
 

Modified: pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h	2011-11-16 11:24:06 UTC (rev 3369)
+++ pkg/RcppArmadillo/inst/include/RcppArmadilloWrap.h	2011-11-16 11:26:57 UTC (rev 3370)
@@ -98,6 +98,11 @@
     	return wrap( arma::Cube<typename T1::elem_type>(X) ) ;
     }
     
+    template<typename eT, typename gen_type>
+    SEXP wrap(const GenCube<eT,gen_type>& X){
+        return wrap( Cube<eT>( X ) ) ;   
+    }
+    
     namespace RcppArmadillo{
     	
     	/* we can intercept and directly build the resulting matrix using 



More information about the Rcpp-commits mailing list