From e6300efb5c97cbd66b58b944441f66147bb375ad Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Sun, 28 Mar 2010 17:33:56 +0100 Subject: Extend documentation for HessenbergDecomposition. --- doc/snippets/HessenbergDecomposition_matrixH.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/snippets/HessenbergDecomposition_matrixH.cpp (limited to 'doc/snippets/HessenbergDecomposition_matrixH.cpp') 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 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; -- cgit v1.2.3