aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/MatrixBase_marked.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/MatrixBase_marked.cpp')
-rw-r--r--doc/snippets/MatrixBase_marked.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_marked.cpp b/doc/snippets/MatrixBase_marked.cpp
new file mode 100644
index 000000000..f60712178
--- /dev/null
+++ b/doc/snippets/MatrixBase_marked.cpp
@@ -0,0 +1,14 @@
+#ifndef _MSC_VER
+ #warning deprecated
+#endif
+/*
+Matrix3d m = Matrix3d::Zero();
+m.part<Eigen::UpperTriangular>().setOnes();
+cout << "Here is the matrix m:" << endl << m << endl;
+Matrix3d n = Matrix3d::Ones();
+n.part<Eigen::LowerTriangular>() *= 2;
+cout << "Here is the matrix n:" << endl << n << endl;
+cout << "And now here is m.inverse()*n, taking advantage of the fact that"
+ " m is upper-triangular:" << endl
+ << m.marked<Eigen::UpperTriangular>().solveTriangular(n);
+*/ \ No newline at end of file