summaryrefslogtreecommitdiffhomepage
path: root/eigen/doc/snippets/Jacobi_makeGivens.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'eigen/doc/snippets/Jacobi_makeGivens.cpp')
-rw-r--r--eigen/doc/snippets/Jacobi_makeGivens.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/eigen/doc/snippets/Jacobi_makeGivens.cpp b/eigen/doc/snippets/Jacobi_makeGivens.cpp
new file mode 100644
index 0000000..4b733c3
--- /dev/null
+++ b/eigen/doc/snippets/Jacobi_makeGivens.cpp
@@ -0,0 +1,6 @@
+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; \ No newline at end of file