You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
361 B
7 lines
361 B
EigenSolver<MatrixXf> es;
|
|
MatrixXf A = MatrixXf::Random(4,4);
|
|
es.compute(A, /* computeEigenvectors = */ false);
|
|
cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
|
|
es.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I
|
|
cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
|