[Rcpp-commits] r1211 - in pkg: Rcpp/inst/unitTests RcppGSL/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 12 20:15:37 CEST 2010


Author: romain
Date: 2010-05-12 20:15:37 +0200 (Wed, 12 May 2010)
New Revision: 1211

Modified:
   pkg/Rcpp/inst/unitTests/runit.environments.R
   pkg/RcppGSL/inst/include/RcppGSLForward.h
Log:
remove test involving as.environment(iris) in anticipation to R 2.12.0 list2env, etc ...

Modified: pkg/Rcpp/inst/unitTests/runit.environments.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.environments.R	2010-05-12 12:54:39 UTC (rev 1210)
+++ pkg/Rcpp/inst/unitTests/runit.environments.R	2010-05-12 18:15:37 UTC (rev 1211)
@@ -163,7 +163,6 @@
 	funx <- cppfunction(signature(x="ANY"), 'Rcpp::Environment env(x) ;' )
 	checkException( funx( funx ), msg = "not an environment" )
 	checkException( funx( letters ), msg = "not an environment" )
-	checkException( funx( iris ), msg = "not an environment" )
 	checkException( funx( NULL ), msg = "not an environment" )
 }
 

Modified: pkg/RcppGSL/inst/include/RcppGSLForward.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 12:54:39 UTC (rev 1210)
+++ pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 18:15:37 UTC (rev 1211)
@@ -116,10 +116,39 @@
 	}                                                                            \
 } ;                                                                             \
 
-// FIXME: the private copy ctors and assignment operator are 
-//        here to prevent copying of the object. maybe we can think of 
-//        a better strategy
+// template <> class matrix<__T__>  {           	                                   \     
+// public:                                      	                                   \     
+// 	typedef __T__ type ;                     	                                   \     
+// 	typedef __T__* pointer ;                 	                                   \     
+// 	typedef gsl_matrix##__SUFFIX__ gsltype ; 	                                   \     
+// 	gsltype* data ;                          	                                   \     
+// 	const static int RTYPE = ::Rcpp::traits::r_sexptype_traits<type>::rtype ;    \       
+// 	matrix( SEXP x) throw(::Rcpp::not_compatible) : data(0) {                    \       
+// 		if( !Rf_isMatrix(x) ) throw not_compatible("not a matrix") ;             \       
+// 		SEXP y = ::Rcpp::internal::rowmajor_wrap( ) ;                            \       
+// 		data = gsl_matrix##__SUFFIX__##_calloc( size ) ;                         \       
+// 		::Rcpp::internal::export_range<__CAST__*>( y,                            \       
+// 			reinterpret_cast<__CAST__*>( data->data ) ) ;                        \       
+// 	}                                                                            \       
+// 	matrix( gsltype* x) : data(x) {}                                             \       
+// 	matrix( int nrow, int ncol) :                                                \       
+// 		data( gsl_matrix##__SUFFIX__##_alloc( nrow, ncol ) ){}                   \       
+// 	~matrix(){ }                                                                 \       
+// 	operator gsltype*(){ return data ; }                                         \       
+// 	gsltype* operator->() const { return data; }                                 \       
+// 	gsltype& operator*() const { return *data; }                                 \       
+// 	matrix( const matrix& x) : data(x.data)  {}                                  \       
+// 	matrix& operator=(const matrix& other) {                                     \       
+// 		data = other.data ;                                                      \       
+// 		return *this ;                                                           \       
+// 	}                                                                            \       
+// 	void free(){                                                                 \       
+// 		gsl_matrix##__SUFFIX__##_free(data) ;                                    \       
+// 	}                                                                            \       
+// } ;                                                                              \       
+//  
 
+
 _RCPPGSL_SPEC(double                   ,                       , double                  )
 _RCPPGSL_SPEC(float                    , _float                , float                   )
 _RCPPGSL_SPEC(int                      , _int                  , int                     )



More information about the Rcpp-commits mailing list