Squashed 'third_party/eigen/' content from commit 61d72f6
Change-Id: Iccc90fa0b55ab44037f018046d2fcffd90d9d025
git-subtree-dir: third_party/eigen
git-subtree-split: 61d72f6383cfa842868c53e30e087b0258177257
diff --git a/doc/examples/TutorialLinAlgSetThreshold.cpp b/doc/examples/TutorialLinAlgSetThreshold.cpp
new file mode 100644
index 0000000..3956b13
--- /dev/null
+++ b/doc/examples/TutorialLinAlgSetThreshold.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+#include <Eigen/Dense>
+
+using namespace std;
+using namespace Eigen;
+
+int main()
+{
+ Matrix2d A;
+ A << 2, 1,
+ 2, 0.9999999999;
+ FullPivLU<Matrix2d> lu(A);
+ cout << "By default, the rank of A is found to be " << lu.rank() << endl;
+ lu.setThreshold(1e-5);
+ cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << endl;
+}