From 6ce996f219170f79f93a21ca86c7f3bd0f425102 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 13 Jan 2008 22:48:57 +0000 Subject: big improvement of the block-manipulation API - reduction of sizeof(Block) for vector types - variants of block() and fixedBlock() for vector blocks - convenience methods start() and end() for vectors - convenience method corner() for matrices --- doc/snippets/MatrixBase_block_int_int_int_int.cpp | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/snippets/MatrixBase_block_int_int_int_int.cpp (limited to 'doc/snippets/MatrixBase_block_int_int_int_int.cpp') diff --git a/doc/snippets/MatrixBase_block_int_int_int_int.cpp b/doc/snippets/MatrixBase_block_int_int_int_int.cpp new file mode 100644 index 000000000..12363d028 --- /dev/null +++ b/doc/snippets/MatrixBase_block_int_int_int_int.cpp @@ -0,0 +1,5 @@ +Matrix3d m = Vector3d(1,2,3).asDiagonal(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.block(1, 1, 2, 1):" << endl << m.block(1, 1, 2, 1) << endl; +m.block(1, 0, 2, 1) = m.block(1, 1, 2, 1); +cout << "Now the matrix m is:" << endl << m << endl; -- cgit v1.2.3