source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/snippets/EigenSolver_compute.cpp

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 361 bytes
Line 
1EigenSolver<MatrixXf> es;
2MatrixXf A = MatrixXf::Random(4,4);
3es.compute(A, /* computeEigenvectors = */ false);
4cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl;
5es.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I
6cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl;
Note: See TracBrowser for help on using the repository browser.