SelfAdjointEigenSolver_compute_MatrixType.cpp
Go to the documentation of this file.
1 SelfAdjointEigenSolver<MatrixXf> es(4);
2 MatrixXf X = MatrixXf::Random(4,4);
3 MatrixXf A = X + X.transpose();
4 es.compute(A);
5 cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
6 es.compute(A + MatrixXf::Identity(4,4)); // re-use es to compute eigenvalues of A+I
7 cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
SelfAdjointEigenSolver< MatrixXf > es(4)
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.
Definition: Matrix.h:501