[Rcpp-commits] r1221 - pkg/RcppGSL/inst/include
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 13 14:03:02 CEST 2010
Author: romain
Date: 2010-05-13 14:03:02 +0200 (Thu, 13 May 2010)
New Revision: 1221
Modified:
pkg/RcppGSL/inst/include/RcppGSLForward.h
pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h
Log:
we don't need RcppGSL::vector_view
Modified: pkg/RcppGSL/inst/include/RcppGSLForward.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSLForward.h 2010-05-13 09:07:09 UTC (rev 1220)
+++ pkg/RcppGSL/inst/include/RcppGSLForward.h 2010-05-13 12:03:02 UTC (rev 1221)
@@ -95,9 +95,7 @@
namespace RcppGSL{
template <typename T> class vector ;
- template <typename T> class vector_view ;
template <typename T> class matrix ;
- template <typename T> class matrix_view ;
#undef _RCPPGSL_SPEC
#define _RCPPGSL_SPEC(__T__,__SUFFIX__,__CAST__) \
@@ -131,23 +129,6 @@
gsl_vector##__SUFFIX__##_free(data) ; \
} \
} ; \
-template <> class vector_view<__T__> { \
-public: \
- typedef __T__ type ; \
- typedef __T__* pointer ; \
- typedef gsl_vector##__SUFFIX__##_view gsltype ; \
- gsltype* data ; \
- vector_view( gsltype* x) : data(x) {} \
- ~vector_view(){ } \
- operator gsltype*(){ return data ; } \
- gsltype* operator->() const { return data; } \
- gsltype& operator*() const { return *data; } \
- vector_view( const vector_view& x) : data(x.data) {} \
- vector_view& operator=(const vector_view& other) { \
- data = other.data ; \
- return *this ; \
- } \
-} ; \
template <> class matrix<__T__> { \
public: \
typedef __T__ type ; \
@@ -174,24 +155,6 @@
private: \
inline void import(SEXP x) throw(::Rcpp::not_compatible); \
} ; \
-template <> class matrix_view<__T__> { \
-public: \
- typedef __T__ type ; \
- typedef __T__* pointer ; \
- typedef gsl_matrix##__SUFFIX__##_view gsltype ; \
- gsltype* data ; \
- matrix_view( gsltype* x) : data(x) {} \
- ~matrix_view(){ } \
- operator gsltype*(){ return data ; } \
- gsltype* operator->() const { return data; } \
- gsltype& operator*() const { return *data; } \
- matrix_view( const matrix_view& x) : data(x.data) {} \
- matrix_view& operator=(const matrix_view& other) { \
- data = other.data ; \
- return *this ; \
- } \
-} ;
-
_RCPPGSL_SPEC(double , , double )
_RCPPGSL_SPEC(float , _float , float )
@@ -241,9 +204,7 @@
_RCPPGSL_WRAPDEF(_ulong )
template <typename T> SEXP wrap( const ::RcppGSL::vector<T>& ) ;
- template <typename T> SEXP wrap( const ::RcppGSL::vector_view<T>& ) ;
template <typename T> SEXP wrap( const ::RcppGSL::matrix<T>& ) ;
- template <typename T> SEXP wrap( const ::RcppGSL::matrix_view<T>& ) ;
}
Modified: pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h 2010-05-13 09:07:09 UTC (rev 1220)
+++ pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h 2010-05-13 12:03:02 UTC (rev 1221)
@@ -51,10 +51,6 @@
RCPPGSL_VIEW(_ulong)
#undef RCPPGSL_VIEW
-template <typename T> SEXP wrap( const ::RcppGSL::matrix_view<T>& x){
- return wrap( *(x.data) ) ;
-}
-
}
#endif
More information about the Rcpp-commits
mailing list