diff options
Diffstat (limited to 'eigen/doc/snippets/MatrixBase_template_int_topRows.cpp')
-rw-r--r-- | eigen/doc/snippets/MatrixBase_template_int_topRows.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp b/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp new file mode 100644 index 0000000..0110251 --- /dev/null +++ b/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp @@ -0,0 +1,6 @@ +Array44i a = Array44i::Random(); +cout << "Here is the array a:" << endl << a << endl; +cout << "Here is a.topRows<2>():" << endl; +cout << a.topRows<2>() << endl; +a.topRows<2>().setZero(); +cout << "Now the array a is:" << endl << a << endl; |