Line | |
---|
1 | #include <Eigen/Dense>
|
---|
2 | #include <iostream>
|
---|
3 |
|
---|
4 | using namespace Eigen;
|
---|
5 | using namespace std;
|
---|
6 |
|
---|
7 | int main(int, char**)
|
---|
8 | {
|
---|
9 | cout.precision(3);
|
---|
10 | Matrix2f m = Matrix2f::Random();
|
---|
11 | m = (m + m.adjoint()).eval();
|
---|
12 | JacobiRotation<float> J;
|
---|
13 | J.makeJacobi(m, 0, 1);
|
---|
14 | cout << "Here is the matrix m:" << endl << m << endl;
|
---|
15 | m.applyOnTheLeft(0, 1, J.adjoint());
|
---|
16 | m.applyOnTheRight(0, 1, J);
|
---|
17 | cout << "Here is the matrix J' * m * J:" << endl << m << endl;
|
---|
18 | return 0;
|
---|
19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.