mesytec-mnode/external/taskflow-3.8.0/3rd-party/eigen-3.3.7/doc/snippets/Jacobi_makeGivens.cpp

6 lines
235 B
C++
Raw Permalink Normal View History

2025-01-04 01:25:05 +01:00
Vector2f v = Vector2f::Random();
JacobiRotation<float> G;
G.makeGivens(v.x(), v.y());
cout << "Here is the vector v:" << endl << v << endl;
v.applyOnTheLeft(0, 1, G.adjoint());
cout << "Here is the vector J' * v:" << endl << v << endl;