From 13a1b0ba2797abaa58bea4f8446e5d8e939e66d5 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Wed, 24 Mar 2010 13:04:03 +0000 Subject: [PATCH] Add snippets file which should have been added in the previous commit. --- doc/snippets/ComplexSchur_compute.cpp | 6 ++++++ doc/snippets/ComplexSchur_matrixT.cpp | 4 ++++ doc/snippets/ComplexSchur_matrixU.cpp | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 doc/snippets/ComplexSchur_compute.cpp create mode 100644 doc/snippets/ComplexSchur_matrixT.cpp create mode 100644 doc/snippets/ComplexSchur_matrixU.cpp diff --git a/doc/snippets/ComplexSchur_compute.cpp b/doc/snippets/ComplexSchur_compute.cpp new file mode 100644 index 000000000..3a5170101 --- /dev/null +++ b/doc/snippets/ComplexSchur_compute.cpp @@ -0,0 +1,6 @@ +MatrixXcf A = MatrixXcf::Random(4,4); +ComplexSchur 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; diff --git a/doc/snippets/ComplexSchur_matrixT.cpp b/doc/snippets/ComplexSchur_matrixT.cpp new file mode 100644 index 000000000..8380571ac --- /dev/null +++ b/doc/snippets/ComplexSchur_matrixT.cpp @@ -0,0 +1,4 @@ +MatrixXcf A = MatrixXcf::Random(4,4); +cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; +ComplexSchur schurOfA(A, false); // false means do not compute U +cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl; diff --git a/doc/snippets/ComplexSchur_matrixU.cpp b/doc/snippets/ComplexSchur_matrixU.cpp new file mode 100644 index 000000000..ba3d9c22e --- /dev/null +++ b/doc/snippets/ComplexSchur_matrixU.cpp @@ -0,0 +1,4 @@ +MatrixXcf A = MatrixXcf::Random(4,4); +cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; +ComplexSchur schurOfA(A); +cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl;