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

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

Doc

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