source:
pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/examples/TutorialLinAlgSetThreshold.cpp
| Last change on this file was 136, checked in by , 9 years ago | |
|---|---|
| File size: 377 bytes | |
| Line | |
|---|---|
| 1 | #include <iostream> |
| 2 | #include <Eigen/Dense> |
| 3 | |
| 4 | using namespace std; |
| 5 | using namespace Eigen; |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | Matrix2d A; |
| 10 | A << 2, 1, |
| 11 | 2, 0.9999999999; |
| 12 | FullPivLU<Matrix2d> lu(A); |
| 13 | cout << "By default, the rank of A is found to be " << lu.rank() << endl; |
| 14 | lu.setThreshold(1e-5); |
| 15 | cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << endl; |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
