diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-03-28 17:33:56 +0100 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-03-28 17:33:56 +0100 |
commit | e6300efb5c97cbd66b58b944441f66147bb375ad (patch) | |
tree | 35967ac404865caf2fe17e8527c93dc0632c22aa /doc/snippets/HessenbergDecomposition_matrixH.cpp | |
parent | 0a5c2d8a54bf0bdab7a7c68e824002ba163bbdca (diff) |
Extend documentation for HessenbergDecomposition.
Diffstat (limited to 'doc/snippets/HessenbergDecomposition_matrixH.cpp')
-rw-r--r-- | doc/snippets/HessenbergDecomposition_matrixH.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/snippets/HessenbergDecomposition_matrixH.cpp b/doc/snippets/HessenbergDecomposition_matrixH.cpp new file mode 100644 index 000000000..af0136668 --- /dev/null +++ b/doc/snippets/HessenbergDecomposition_matrixH.cpp @@ -0,0 +1,8 @@ +Matrix4f A = MatrixXf::Random(4,4); +cout << "Here is a random 4x4 matrix:" << endl << A << endl; +HessenbergDecomposition<MatrixXf> hessOfA(A); +MatrixXf H = hessOfA.matrixH(); +cout << "The Hessenberg matrix H is:" << endl << H << endl; +MatrixXf Q = hessOfA.matrixQ(); +cout << "The orthogonal matrix Q is:" << endl << Q << endl; +cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl; |