From 1a94c28bfeb1bd594e900817d4f2b711e666b432 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 5 Dec 2007 07:39:26 +0000 Subject: and here is the fixed-size Block class --- doc/tutorial.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/tutorial.cpp') diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp index 5daf2f027..8348cab52 100644 --- a/doc/tutorial.cpp +++ b/doc/tutorial.cpp @@ -18,13 +18,13 @@ int main(int, char **) // notice how we are mixing fixed-size and dynamic-size types. cout << "In the top-left block, we put the matrix m shown above." << endl; - m2.block(0,0,2,2) = m; + m2.block<2,2>(0,0) = m; cout << "In the bottom-left block, we put the matrix m*m, which is:" << endl << m*m << endl; - m2.block(2,0,2,2) = m * m; + m2.block<2,2>(2,0) = m * m; cout << "In the top-right block, we put the matrix m+m, which is:" << endl << m+m << endl; - m2.block(0,2,2,2) = m + m; + m2.block<2,2>(0,2) = m + m; cout << "In the bottom-right block, we put the matrix m-m, which is:" << endl << m-m << endl; - m2.block(2,2,2,2) = m - m; + m2.block<2,2>(2,2) = m - m; cout << "Now the 4x4 matrix m2 is:" << endl << m2 << endl; cout << "Row 0 of m2 is:" << endl << m2.row(0) << endl; -- cgit v1.2.3