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.cpp | 5 ----- doc/snippets/MatrixBase_block_int_int_int_int.cpp | 5 +++++ doc/snippets/MatrixBase_dynBlock.cpp | 5 ----- doc/snippets/MatrixBase_fixedBlock_int_int.cpp | 5 +++++ 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 doc/snippets/MatrixBase_block.cpp create mode 100644 doc/snippets/MatrixBase_block_int_int_int_int.cpp delete mode 100644 doc/snippets/MatrixBase_dynBlock.cpp create mode 100644 doc/snippets/MatrixBase_fixedBlock_int_int.cpp (limited to 'doc/snippets') diff --git a/doc/snippets/MatrixBase_block.cpp b/doc/snippets/MatrixBase_block.cpp deleted file mode 100644 index 984fd7094..000000000 --- a/doc/snippets/MatrixBase_block.cpp +++ /dev/null @@ -1,5 +0,0 @@ -Matrix4d m = Vector4d(1,2,3,4).asDiagonal(); -cout << "Here is the matrix m:" << endl << m << endl; -cout << "Here is m.fixedBlock<2, 2>(2, 2):" << endl << m.fixedBlock<2, 2>(2, 2) << endl; -m.fixedBlock<2, 2>(2, 0) = m.fixedBlock<2, 2>(2, 2); -cout << "Now the matrix m is:" << endl << m << endl; 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; diff --git a/doc/snippets/MatrixBase_dynBlock.cpp b/doc/snippets/MatrixBase_dynBlock.cpp deleted file mode 100644 index 12363d028..000000000 --- a/doc/snippets/MatrixBase_dynBlock.cpp +++ /dev/null @@ -1,5 +0,0 @@ -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; diff --git a/doc/snippets/MatrixBase_fixedBlock_int_int.cpp b/doc/snippets/MatrixBase_fixedBlock_int_int.cpp new file mode 100644 index 000000000..984fd7094 --- /dev/null +++ b/doc/snippets/MatrixBase_fixedBlock_int_int.cpp @@ -0,0 +1,5 @@ +Matrix4d m = Vector4d(1,2,3,4).asDiagonal(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.fixedBlock<2, 2>(2, 2):" << endl << m.fixedBlock<2, 2>(2, 2) << endl; +m.fixedBlock<2, 2>(2, 0) = m.fixedBlock<2, 2>(2, 2); +cout << "Now the matrix m is:" << endl << m << endl; -- cgit v1.2.3