mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add an example for GeneralizedEigenSolver
This commit is contained in:
7
doc/snippets/GeneralizedEigenSolver.cpp
Normal file
7
doc/snippets/GeneralizedEigenSolver.cpp
Normal 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;
|
||||
Reference in New Issue
Block a user