add examples for makeJacobi and makeGivens

This commit is contained in:
Gael Guennebaud
2009-09-03 11:17:16 +02:00
parent c893917d65
commit 16c7b1daab
6 changed files with 49 additions and 12 deletions

View File

@@ -0,0 +1,8 @@
Matrix2f m = Matrix2f::Random();
m = (m + m.adjoint()).eval();
PlanarRotation<float> J;
J.makeJacobi(m, 0, 1);
cout << "Here is the matrix m:" << endl << m << endl;
m.applyOnTheLeft(0, 1, J.adjoint());
m.applyOnTheRight(0, 1, J);
cout << "Here is the matrix J' * m * J:" << endl << m << endl;