3 cout <<
"Here is the matrix mat:\n" <<
mat << endl << endl;
6 cout <<
"After 'mat = 2 * mat', mat = \n" <<
mat << endl << endl;
9 mat =
mat - MatrixXf::Identity(2,2);
10 cout <<
"After the subtraction, it becomes\n" <<
mat << endl << endl;
15 cout <<
"After squaring, it becomes\n" << arr << endl << endl;
19 mat = (2 *
mat - MatrixXf::Identity(2,2)).
array().square();
20 cout <<
"Doing everything at once yields\n" <<
mat << endl << endl;
Array< float, Dynamic, Dynamic > ArrayXXf
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.