[Rcpp-commits] r922 - pkg/Rcpp/src/Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 19 17:58:22 CET 2010


Author: edd
Date: 2010-03-19 17:58:22 +0100 (Fri, 19 Mar 2010)
New Revision: 922

Modified:
   pkg/Rcpp/src/Rcpp/Vector.h
Log:
add a (symmetric) Matrix constructor that takes a single int


Modified: pkg/Rcpp/src/Rcpp/Vector.h
===================================================================
--- pkg/Rcpp/src/Rcpp/Vector.h	2010-03-19 16:30:45 UTC (rev 921)
+++ pkg/Rcpp/src/Rcpp/Vector.h	2010-03-19 16:58:22 UTC (rev 922)
@@ -2188,6 +2188,7 @@
 	}
 	
 	Matrix( const int& nrows, const int& ncols) : VECTOR( Dimension( nrows, ncols ) ) {}
+	Matrix( const int& n) : VECTOR( Dimension( n, n ) ) {}
 	
 	Matrix( const Matrix& other) : VECTOR() {
 		SEXP x = other.asSexp() ;



More information about the Rcpp-commits mailing list