mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-17 18:09:55 +08:00
documentation update for alpha 3
This commit is contained in:
parent
6ce996f219
commit
57d7b7d97b
@ -44,7 +44,7 @@
|
||||
* \include class_Block.cpp
|
||||
* Output: \verbinclude class_Block.out
|
||||
*
|
||||
* \note Even though this expression has dynamic size, in the case where the \a MatrixType
|
||||
* \note Even though this expression has dynamic size, in the case where \a MatrixType
|
||||
* has fixed size, this expression inherits a fixed maximal size which means that evaluating
|
||||
* it does not cause a dynamic memory allocation.
|
||||
*
|
||||
@ -112,6 +112,10 @@ template<typename MatrixType> class Block
|
||||
* Example: \include MatrixBase_block_int_int_int_int.cpp
|
||||
* Output: \verbinclude MatrixBase_block_int_int_int_int.out
|
||||
*
|
||||
* \note Even though the returned expression has dynamic size, in the case
|
||||
* when it is applied to a fixed-size matrix, it inherits a fixed maximal size,
|
||||
* which means that evaluating it does not cause a dynamic memory allocation.
|
||||
*
|
||||
* \sa class Block, fixedBlock(int,int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
@ -139,6 +143,10 @@ const Block<Derived> MatrixBase<Scalar, Derived>
|
||||
* Example: \include MatrixBase_block_int_int.cpp
|
||||
* Output: \verbinclude MatrixBase_block_int_int.out
|
||||
*
|
||||
* \note Even though the returned expression has dynamic size, in the case
|
||||
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
||||
* which means that evaluating it does not cause a dynamic memory allocation.
|
||||
*
|
||||
* \sa class Block, fixedBlock(int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
@ -173,6 +181,10 @@ const Block<Derived> MatrixBase<Scalar, Derived>
|
||||
* Example: \include MatrixBase_start_int.cpp
|
||||
* Output: \verbinclude MatrixBase_start_int.out
|
||||
*
|
||||
* \note Even though the returned expression has dynamic size, in the case
|
||||
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
||||
* which means that evaluating it does not cause a dynamic memory allocation.
|
||||
*
|
||||
* \sa class Block, block(int,int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
@ -205,6 +217,10 @@ const Block<Derived> MatrixBase<Scalar, Derived>
|
||||
* Example: \include MatrixBase_end_int.cpp
|
||||
* Output: \verbinclude MatrixBase_end_int.out
|
||||
*
|
||||
* \note Even though the returned expression has dynamic size, in the case
|
||||
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
||||
* which means that evaluating it does not cause a dynamic memory allocation.
|
||||
*
|
||||
* \sa class Block, block(int,int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
@ -234,13 +250,18 @@ const Block<Derived> MatrixBase<Scalar, Derived>
|
||||
|
||||
/** \returns a dynamic-size expression of a corner of *this.
|
||||
*
|
||||
* \param type the type of corner. Can be \a TopLeft, \a TopRight, \a BottomLeft, \a BottomRight.
|
||||
* \param type the type of corner. Can be \a Eigen::TopLeft, \a Eigen::TopRight,
|
||||
* \a Eigen::BottomLeft, \a Eigen::BottomRight.
|
||||
* \param cRows the number of rows in the corner
|
||||
* \param cCols the number of columns in the corner
|
||||
*
|
||||
* Example: \include MatrixBase_corner_enum_int_int.cpp
|
||||
* Output: \verbinclude MatrixBase_corner_enum_int_int.out
|
||||
*
|
||||
* \note Even though the returned expression has dynamic size, in the case
|
||||
* when it is applied to a fixed-size matrix, it inherits a fixed maximal size,
|
||||
* which means that evaluating it does not cause a dynamic memory allocation.
|
||||
*
|
||||
* \sa class Block, block(int,int,int,int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
|
5
doc/snippets/MatrixBase_block_int_int.cpp
Normal file
5
doc/snippets/MatrixBase_block_int_int.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.block(1, 2):" << endl << v.block(1, 2) << endl;
|
||||
v.block(1, 2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
@ -1,5 +1,5 @@
|
||||
Matrix3d m = Vector3d(1,2,3).asDiagonal();
|
||||
Matrix4i m = Matrix4i::random();
|
||||
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 << "Here is m.block(1, 1, 2, 2):" << endl << m.block(1, 1, 2, 2) << endl;
|
||||
m.block(1, 1, 2, 2).setZero();
|
||||
cout << "Now the matrix m is:" << endl << m << endl;
|
||||
|
6
doc/snippets/MatrixBase_corner_enum_int_int.cpp
Normal file
6
doc/snippets/MatrixBase_corner_enum_int_int.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
Matrix4i m = Matrix4i::random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the bottom-right 2x3 corner in m:" << endl
|
||||
<< m.corner(Eigen::BottomRight, 2, 3) << endl;
|
||||
m.corner(Eigen::BottomRight, 2, 3).setZero();
|
||||
cout << "Now the matrix m is:" << endl << m << endl;
|
5
doc/snippets/MatrixBase_end_int.cpp
Normal file
5
doc/snippets/MatrixBase_end_int.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.end(2):" << endl << v.end(2) << endl;
|
||||
v.end(2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
5
doc/snippets/MatrixBase_start_int.cpp
Normal file
5
doc/snippets/MatrixBase_start_int.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.start(2):" << endl << v.start(2) << endl;
|
||||
v.start(2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
Loading…
Reference in New Issue
Block a user