COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/MatrixBase_applyOnTheRight.cpp

10 lines
292 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
Matrix3f A = Matrix3f::Random(3,3), B;
B << 0,1,0,
0,0,1,
1,0,0;
cout << "At start, A = " << endl << A << endl;
A *= B;
cout << "After A *= B, A = " << endl << A << endl;
A.applyOnTheRight(B); // equivalent to A *= B
cout << "After applyOnTheRight, A = " << endl << A << endl;