xref: /aosp_15_r20/external/eigen/doc/snippets/MatrixBase_topRows_int.cpp (revision bf2c37156dfe67e5dfebd6d394bad8b2ab5804d4)
1*bf2c3715SXin Li Array44i a = Array44i::Random();
2*bf2c3715SXin Li cout << "Here is the array a:" << endl << a << endl;
3*bf2c3715SXin Li cout << "Here is a.topRows(2):" << endl;
4*bf2c3715SXin Li cout << a.topRows(2) << endl;
5*bf2c3715SXin Li a.topRows(2).setZero();
6*bf2c3715SXin Li cout << "Now the array a is:" << endl << a << endl;
7