Gael Guennebaud | c10f069 | 2008-07-21 00:34:46 +0000 | [diff] [blame^] | 1 | Matrix3d m = Matrix3i::Zero(); |
Benoit Jacob | 486fdb2 | 2008-05-29 03:12:30 +0000 | [diff] [blame] | 2 | m.part<Eigen::StrictlyUpper>().setOnes(); |
3 | cout << "Here is the matrix m:" << endl << m << endl; | ||||
4 | cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl | ||||
5 | << "taking advantage of the symmetry." << endl; | ||||
6 | Matrix3d n; | ||||
7 | n.part<Eigen::SelfAdjoint>() = (m*m.adjoint()).lazy(); | ||||
8 | cout << "The result is:" << endl << n << endl; |