diff options
author | 2010-04-12 18:14:32 +0100 | |
---|---|---|
committer | 2010-04-12 18:14:32 +0100 | |
commit | 73d3a27667aff4506a20693140dc603110e48cbc (patch) | |
tree | 070dbcddaa7c9f5a6dee2a20400c3d361314573b /doc | |
parent | 872df22ca4cb5a44ad2e0be5c16e50f8877ebb14 (diff) |
RealSchur: Make sure zeros are really zero (cont'd); add default ctor, docs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/snippets/RealSchur_RealSchur_MatrixType.cpp | 10 | ||||
-rw-r--r-- | doc/snippets/RealSchur_compute.cpp | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/snippets/RealSchur_RealSchur_MatrixType.cpp b/doc/snippets/RealSchur_RealSchur_MatrixType.cpp new file mode 100644 index 000000000..a5530dcc8 --- /dev/null +++ b/doc/snippets/RealSchur_RealSchur_MatrixType.cpp @@ -0,0 +1,10 @@ +MatrixXd A = MatrixXd::Random(6,6); +cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; + +RealSchur<MatrixXd> schur(A); +cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl; +cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl; + +MatrixXd U = schur.matrixU(); +MatrixXd T = schur.matrixT(); +cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl; diff --git a/doc/snippets/RealSchur_compute.cpp b/doc/snippets/RealSchur_compute.cpp new file mode 100644 index 000000000..4dcfaf0f2 --- /dev/null +++ b/doc/snippets/RealSchur_compute.cpp @@ -0,0 +1,6 @@ +MatrixXf A = MatrixXf::Random(4,4); +RealSchur<MatrixXf> schur(4); +schur.compute(A); +cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl; +schur.compute(A.inverse()); +cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl; |