blob: 73229304380c75288eca8e2e7a53cfc1410c7037 [file] [log] [blame]
Gael Guennebaudc10f0692008-07-21 00:34:46 +00001Matrix2f M = Matrix2f::Random();
Benoit Jacobe7bdbe2e2007-12-27 21:43:10 +00002Matrix2f m;
3m = M;
4cout << "Here is the matrix m:" << endl << m << endl;
5cout << "Now we want to replace m by its own transpose." << endl;
6cout << "If we do m = m.transpose(), then m becomes:" << endl;
7m = m.transpose();
8cout << m << endl << "which is wrong!" << endl;
9cout << "Now let us instead do m = m.transpose().eval(). Then m becomes" << endl;
10m = M;
11m = m.transpose().eval();
12cout << m << endl << "which is right." << endl;