[Rcpp-commits] r837 - pkg/Rcpp/src/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 5 04:18:10 CET 2010
Author: edd
Date: 2010-03-05 04:18:09 +0100 (Fri, 05 Mar 2010)
New Revision: 837
Modified:
pkg/Rcpp/src/Rcpp/Vector.h
Log:
add rows() and cols() for compatibility
Modified: pkg/Rcpp/src/Rcpp/Vector.h
===================================================================
--- pkg/Rcpp/src/Rcpp/Vector.h 2010-03-05 02:27:22 UTC (rev 836)
+++ pkg/Rcpp/src/Rcpp/Vector.h 2010-03-05 03:18:09 UTC (rev 837)
@@ -501,6 +501,13 @@
inline int nrow(){
return dims()[0];
}
+
+ inline int cols() {
+ return dims()[1];
+ }
+ inline int rows() {
+ return dims()[0];
+ }
/**
* offset based on the dimensions of this vector
More information about the Rcpp-commits
mailing list