mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-11-27 06:30:28 +08:00
Add snippets file which should have been added in the previous commit.
This commit is contained in:
parent
37e17938e9
commit
13a1b0ba27
6
doc/snippets/ComplexSchur_compute.cpp
Normal file
6
doc/snippets/ComplexSchur_compute.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
MatrixXcf A = MatrixXcf::Random(4,4);
|
||||
ComplexSchur<MatrixXcf> 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;
|
4
doc/snippets/ComplexSchur_matrixT.cpp
Normal file
4
doc/snippets/ComplexSchur_matrixT.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
MatrixXcf A = MatrixXcf::Random(4,4);
|
||||
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
|
||||
ComplexSchur<MatrixXcf> schurOfA(A, false); // false means do not compute U
|
||||
cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl;
|
4
doc/snippets/ComplexSchur_matrixU.cpp
Normal file
4
doc/snippets/ComplexSchur_matrixU.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
MatrixXcf A = MatrixXcf::Random(4,4);
|
||||
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
|
||||
ComplexSchur<MatrixXcf> schurOfA(A);
|
||||
cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl;
|
Loading…
Reference in New Issue
Block a user