source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp@
138
Last change on this file since 138 was 136, checked in by , 8 years ago | |
---|---|
File size: 365 bytes |
Line | |
---|---|
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; |
Note:
See TracBrowser
for help on using the repository browser.