You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
230 B
10 lines
230 B
MatrixXf matA(2,2), matB(2,2);
|
|
matA << 2, 0, 0, 2;
|
|
|
|
// Simple but not quite as efficient
|
|
matB = matA * matA;
|
|
cout << matB << endl << endl;
|
|
|
|
// More complicated but also more efficient
|
|
matB.noalias() = matA * matA;
|
|
cout << matB;
|