add an example for GeneralizedEigenSolver

This commit is contained in:
Gael Guennebaud
2012-07-28 18:00:54 +02:00
parent 8ab0e16e27
commit 6f54269829
2 changed files with 15 additions and 18 deletions

View File

@@ -0,0 +1,7 @@
GeneralizedEigenSolver<MatrixXf> ges;
MatrixXf A = MatrixXf::Random(4,4);
MatrixXf B = MatrixXf::Random(4,4);
ges.compute(A, B);
cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl;
cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl;
cout << "The (complex) generalzied eigenvalues are (alphas./beta): " << ges.eigenvalues().transpose() << endl;