diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-09-09 09:30:23 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-09-09 09:30:23 +0000 |
commit | 703539110b5c26f01ac37fe6114afdbb5c3c6c99 (patch) | |
tree | 16be3c0fbdab00bcfa895799f1f73b5015afb30a /doc | |
parent | c41ceee7508965a9f571e6b67f3e396943c6376c (diff) |
add the missing templated version of block for sub-vectors
Diffstat (limited to 'doc')
-rw-r--r-- | doc/QuickStartGuide.dox | 2 | ||||
-rw-r--r-- | doc/snippets/MatrixBase_template_int.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/QuickStartGuide.dox b/doc/QuickStartGuide.dox index 8d1799fdd..d55e07856 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -351,6 +351,8 @@ mat = 2 7 8 \endcode</td></tr> </table> +Also note that maxCoeff and minCoeff can takes optional arguments returning the coordinates of the respective min/max coeff: \link MatrixBase::maxCoeff(int*,int*) const maxCoeff(int* i, int* j) \endlink, \link MatrixBase::minCoeff(int*,int*) const minCoeff(int* i, int* j) \endlink. + <span class="note">\b Side \b note: The all() and any() functions are especially useful in combinaison with coeff-wise comparison operators (\ref CwiseAll "example").</span> diff --git a/doc/snippets/MatrixBase_template_int.cpp b/doc/snippets/MatrixBase_template_int.cpp new file mode 100644 index 000000000..4041a2214 --- /dev/null +++ b/doc/snippets/MatrixBase_template_int.cpp @@ -0,0 +1,5 @@ +RowVector5i v = RowVector5i::Random(); +cout << "Here is the vector v:" << endl << v << endl; +cout << "Here is v.block<2>(1):" << endl << v.start<2>() << endl; +v.block<2>(2).setZero(); +cout << "Now the vector v is:" << endl << v << endl; |