blob: 6f393a14a13eeaa65a9c776959066477d31e141f [file] [log] [blame]
Benoit Jacob9b06e072009-01-27 17:42:04 +00001Matrix3d m = Matrix3d::Zero();
Benoit Jacob9e00d942008-12-20 13:36:12 +00002m.part<Eigen::StrictlyUpperTriangular>().setOnes();
Benoit Jacob486fdb22008-05-29 03:12:30 +00003cout << "Here is the matrix m:" << endl << m << endl;
4cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl
5 << "taking advantage of the symmetry." << endl;
6Matrix3d n;
7n.part<Eigen::SelfAdjoint>() = (m*m.adjoint()).lazy();
8cout << "The result is:" << endl << n << endl;