blob: a3ff56851cf21b355714ebb4cdb05ae27f6ec2a6 [file] [log] [blame]
Jitse Niesen42a050d2010-12-27 15:06:55 +00001MatrixXf matA(2,2), matB(2,2);
2matA << 2, 0, 0, 2;
3
4// Simple but not quite as efficient
5matB = matA * matA;
6cout << matB << endl << endl;
7
8// More complicated but also more efficient
9matB.noalias() = matA * matA;
10cout << matB;