aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2010-07-23 22:20:00 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2010-07-23 22:20:00 +0100
commit425444428c366a09cbc7608c89deac7bcf8da621 (patch)
treeff4f41d0c1a118b2abe3fe06d0f453e21fbeb7b0 /doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
parent2b5a0060b4576776f6a3d1411654009dd40a2d41 (diff)
Add examples for API documentation of block methods in DenseBase.
Diffstat (limited to 'doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp')
-rw-r--r--doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
new file mode 100644
index 000000000..1899d902d
--- /dev/null
+++ b/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp
@@ -0,0 +1,6 @@
+Matrix4i m = Matrix4i::Random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is m.topLeftCorner<2,2>():" << endl;
+cout << m.topLeftCorner<2,2>() << endl;
+m.topLeftCorner<2,2>().setZero();
+cout << "Now the matrix m is:" << endl << m << endl;