From e37ff98bbb21f2ee44c6d912002ddf2cdf05ccda Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Tue, 18 Jun 2013 14:29:15 +0100 Subject: Implement mixed static/dynamic-size .block() (bug #579) --- doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp | 5 +++++ .../MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp | 6 ++++++ .../MatrixBase_template_int_int_bottomRightCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp | 6 ++++++ doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp | 6 ++++++ 5 files changed, 29 insertions(+) create mode 100644 doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp create mode 100644 doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp (limited to 'doc/snippets') diff --git a/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp new file mode 100644 index 000000000..4dced03ba --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp @@ -0,0 +1,5 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is the block:" << endl << m.block<2, Dynamic>(1, 1, 2, 3) << endl; +m.block<2, Dynamic>(1, 1, 2, 3).setZero(); +cout << "Now the matrix m is:" << endl << m << endl; diff --git a/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp new file mode 100644 index 000000000..a1edcc808 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp @@ -0,0 +1,6 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.bottomLeftCorner<2,Dynamic>(2,2):" << endl; +cout << m.bottomLeftCorner<2,Dynamic>(2,2) << endl; +m.bottomLeftCorner<2,Dynamic>(2,2).setZero(); +cout << "Now the matrix m is:" << endl << m << endl; diff --git a/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp new file mode 100644 index 000000000..a65508fd8 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp @@ -0,0 +1,6 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.bottomRightCorner<2,Dynamic>(2,2):" << endl; +cout << m.bottomRightCorner<2,Dynamic>(2,2) << endl; +m.bottomRightCorner<2,Dynamic>(2,2).setZero(); +cout << "Now the matrix m is:" << endl << m << endl; diff --git a/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp new file mode 100644 index 000000000..fac761f63 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp @@ -0,0 +1,6 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.topLeftCorner<2,Dynamic>(2,2):" << endl; +cout << m.topLeftCorner<2,Dynamic>(2,2) << endl; +m.topLeftCorner<2,Dynamic>(2,2).setZero(); +cout << "Now the matrix m is:" << endl << m << endl; diff --git a/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp b/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp new file mode 100644 index 000000000..a17acc004 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp @@ -0,0 +1,6 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.topRightCorner<2,Dynamic>(2,2):" << endl; +cout << m.topRightCorner<2,Dynamic>(2,2) << endl; +m.topRightCorner<2,Dynamic>(2,2).setZero(); +cout << "Now the matrix m is:" << endl << m << endl; -- cgit v1.2.3