[Rcpp-commits] r1908 - in pkg/Rcpp: . inst/include/Rcpp/sugar/matrix
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 4 09:42:15 CEST 2010
Author: romain
Date: 2010-08-04 09:42:14 +0200 (Wed, 04 Aug 2010)
New Revision: 1908
Modified:
pkg/Rcpp/TODO
pkg/Rcpp/inst/include/Rcpp/sugar/matrix/col.h
pkg/Rcpp/inst/include/Rcpp/sugar/matrix/diag.h
pkg/Rcpp/inst/include/Rcpp/sugar/matrix/outer.h
pkg/Rcpp/inst/include/Rcpp/sugar/matrix/row.h
pkg/Rcpp/inst/include/Rcpp/sugar/matrix/upper_tri.h
Log:
cleaning
Modified: pkg/Rcpp/TODO
===================================================================
--- pkg/Rcpp/TODO 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/TODO 2010-08-04 07:42:14 UTC (rev 1908)
@@ -74,9 +74,3 @@
of z. perhaps a better implementation would be to
first force the evaluation of x + y.
-
-Speed
-
- o rework lhs use of RObject::slot so that it uses R_do_slot_assign
- instead of an R callback
-
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/matrix/col.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/matrix/col.h 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/matrix/col.h 2010-08-04 07:42:14 UTC (rev 1908)
@@ -36,9 +36,6 @@
Col( const LHS_TYPE& lhs) : nr( lhs.ncol() ), nc( lhs.ncol() ) {}
- // inline int operator[]( int index ) const {
- // return Rcpp::internal::get_column( index, nr) + 1 ;
- // }
inline int operator()( int i, int j ) const {
return j + 1 ;
}
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/matrix/diag.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/matrix/diag.h 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/matrix/diag.h 2010-08-04 07:42:14 UTC (rev 1908)
@@ -56,11 +56,6 @@
Diag_Maker( const VEC_TYPE& object_ ) : object(object_), n(object_.size()) {}
- // inline STORAGE operator[]( int index ) const {
- // int i = Rcpp::internal::get_line( index, n ) ;
- // int j = Rcpp::internal::get_column( index, n, i ) ;
- // return (i==j) ? object[i] : 0 ;
- // }
inline STORAGE operator()( int i, int j ) const {
return (i==j) ? object[i] : 0 ;
}
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/matrix/outer.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/matrix/outer.h 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/matrix/outer.h 2010-08-04 07:42:14 UTC (rev 1908)
@@ -49,12 +49,6 @@
Outer( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_, Function fun_ ) :
lhs(lhs_), rhs(rhs_), fun(fun_), nr(lhs_.size()), nc(rhs_.size()) {}
- // inline STORAGE operator[]( int index ) const {
- // int i = Rcpp::internal::get_line( index, nr ) ;
- // int j = Rcpp::internal::get_column( index, nr, i ) ;
- // return converter_type::get( fun( lhs[i], rhs[j] ) );
- // }
-
inline STORAGE operator()( int i, int j ) const {
return converter_type::get( fun( lhs[i], rhs[j] ) );
}
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/matrix/row.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/matrix/row.h 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/matrix/row.h 2010-08-04 07:42:14 UTC (rev 1908)
@@ -36,9 +36,6 @@
Row( const LHS_TYPE& lhs) : nr( lhs.nrow() ), nc( lhs.ncol() ) {}
- // inline int operator[]( int index ) const {
- // return Rcpp::internal::get_line( index, nr) + 1;
- // }
inline int operator()( int i, int j ) const {
return i + 1 ;
}
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/matrix/upper_tri.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/matrix/upper_tri.h 2010-08-04 07:38:40 UTC (rev 1907)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/matrix/upper_tri.h 2010-08-04 07:42:14 UTC (rev 1908)
@@ -38,11 +38,6 @@
nr( lhs.nrow() ), nc( lhs.ncol() ),
getter( diag ? (&UpperTri::get_diag_true) : (&UpperTri::get_diag_false) ){}
- // inline int operator[]( int index ) const {
- // int i = Rcpp::internal::get_line( index, nr ) ;
- // int j = Rcpp::internal::get_column( index, nr, i ) ;
- // return get(i,j) ;
- // }
inline int operator()( int i, int j ) const {
return get(i,j) ;
}
More information about the Rcpp-commits
mailing list