aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/tutorial.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-12-05 07:22:22 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-12-05 07:22:22 +0000
commit04502cccd9258d1b1714914f4136a91c2cbf5c0c (patch)
tree85c48405c0f4875888be94b518d956cf8feb9e87 /doc/tutorial.cpp
parent346c00f4c88ecfd35d94dbc19eed300021a0580d (diff)
rename Block to DynBlock and rework API to make place for
upcoming fixed-size Block matrix. Also some cleanup.
Diffstat (limited to 'doc/tutorial.cpp')
-rw-r--r--doc/tutorial.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/tutorial.cpp b/doc/tutorial.cpp
index 4400bd2d1..5daf2f027 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,1,0,1) = m;
+ m2.block(0,0,2,2) = m;
cout << "In the bottom-left block, we put the matrix m*m, which is:" << endl << m*m << endl;
- m2.block(2,3,0,1) = m * m;
+ m2.block(2,0,2,2) = m * m;
cout << "In the top-right block, we put the matrix m+m, which is:" << endl << m+m << endl;
- m2.block(0,1,2,3) = m + m;
+ m2.block(0,2,2,2) = m + m;
cout << "In the bottom-right block, we put the matrix m-m, which is:" << endl << m-m << endl;
- m2.block(2,3,2,3) = 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;