[Rcpp-commits] r2733 - in pkg/Rcpp: . inst/include/Rcpp/vector
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 7 11:00:04 CET 2010
Author: romain
Date: 2010-12-07 11:00:03 +0100 (Tue, 07 Dec 2010)
New Revision: 2733
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/vector/Matrix.h
Log:
Matrix gains a nested ::Sub typedef
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2010-12-06 19:36:10 UTC (rev 2732)
+++ pkg/Rcpp/ChangeLog 2010-12-07 10:00:03 UTC (rev 2733)
@@ -1,3 +1,7 @@
+2010-12-07 Romain Francois <romain at r-enthusiasts.com>
+
+ * inst/include/Rcpp/vector/matrix.h: Matrix gains a nested ::Sub typedef
+
2010-12-05 Romain Francois <romain at r-enthusiasts.com>
* inst/include/Rcpp/module/Module_generated_class_constructor.h: the
Modified: pkg/Rcpp/inst/include/Rcpp/vector/Matrix.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/vector/Matrix.h 2010-12-06 19:36:10 UTC (rev 2732)
+++ pkg/Rcpp/inst/include/Rcpp/vector/Matrix.h 2010-12-07 10:00:03 UTC (rev 2733)
@@ -137,6 +137,7 @@
typedef MatrixRow<RTYPE> Row ;
typedef MatrixColumn<RTYPE> Column ;
+ typedef SubMatrix<RTYPE> Sub ;
inline Row operator()( int i, internal::NamedPlaceHolder ){
return Row( *this, i ) ;
@@ -146,16 +147,16 @@
return Column( *this, i ) ;
}
- inline SubMatrix<RTYPE> operator()( const Range& row_range, const Range& col_range){
- return SubMatrix<RTYPE>( const_cast<Matrix&>(*this), row_range, col_range ) ;
+ inline Sub operator()( const Range& row_range, const Range& col_range){
+ return Sub( const_cast<Matrix&>(*this), row_range, col_range ) ;
}
- inline SubMatrix<RTYPE> operator()( internal::NamedPlaceHolder, const Range& col_range){
- return SubMatrix<RTYPE>( const_cast<Matrix&>(*this), Range(0,nrow()-1) , col_range ) ;
+ inline Sub operator()( internal::NamedPlaceHolder, const Range& col_range){
+ return Sub( const_cast<Matrix&>(*this), Range(0,nrow()-1) , col_range ) ;
}
- inline SubMatrix<RTYPE> operator()( const Range& row_range, internal::NamedPlaceHolder ){
- return SubMatrix<RTYPE>( const_cast<Matrix&>(*this), row_range, Range(0,ncol()-1) ) ;
+ inline Sub operator()( const Range& row_range, internal::NamedPlaceHolder ){
+ return Sub( const_cast<Matrix&>(*this), row_range, Range(0,ncol()-1) ) ;
}
More information about the Rcpp-commits
mailing list