mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
many small fixes and documentation improvements,
this should be alpha5.
This commit is contained in:
9
doc/snippets/MatrixBase_marked.cpp
Normal file
9
doc/snippets/MatrixBase_marked.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
Matrix3d m = Matrix3d::zero();
|
||||
m.part<Eigen::Upper>().setOnes();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
Matrix3d n = Matrix3d::ones();
|
||||
n.part<Eigen::Lower>() *= 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::Upper>().inverseProduct(n);
|
||||
Reference in New Issue
Block a user