aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2010-03-28 17:33:56 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2010-03-28 17:33:56 +0100
commite6300efb5c97cbd66b58b944441f66147bb375ad (patch)
tree35967ac404865caf2fe17e8527c93dc0632c22aa /doc/snippets/HessenbergDecomposition_packedMatrix.cpp
parent0a5c2d8a54bf0bdab7a7c68e824002ba163bbdca (diff)
Extend documentation for HessenbergDecomposition.
Diffstat (limited to 'doc/snippets/HessenbergDecomposition_packedMatrix.cpp')
-rw-r--r--doc/snippets/HessenbergDecomposition_packedMatrix.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/snippets/HessenbergDecomposition_packedMatrix.cpp b/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
new file mode 100644
index 000000000..4fa5957e8
--- /dev/null
+++ b/doc/snippets/HessenbergDecomposition_packedMatrix.cpp
@@ -0,0 +1,9 @@
+Matrix4d A = Matrix4d::Random(4,4);
+cout << "Here is a random 4x4 matrix:" << endl << A << endl;
+HessenbergDecomposition<Matrix4d> hessOfA(A);
+Matrix4d pm = hessOfA.packedMatrix();
+cout << "The packed matrix M is:" << endl << pm << endl;
+cout << "The upper Hessenberg part corresponds to the matrix H, which is:"
+ << endl << hessOfA.matrixH() << endl;
+Vector3d hc = hessOfA.householderCoefficients();
+cout << "The vector of Householder coefficients is:" << endl << hc << endl;