Benoit Jacob | 9b06e07 | 2009-01-27 17:42:04 +0000 | [diff] [blame] | 1 | Matrix3d m = Matrix3d::Zero(); |
Benoit Jacob | 9e00d94 | 2008-12-20 13:36:12 +0000 | [diff] [blame] | 2 | m.part<Eigen::StrictlyUpperTriangular>().setOnes(); |
Benoit Jacob | 486fdb2 | 2008-05-29 03:12:30 +0000 | [diff] [blame] | 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; |