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:
8
doc/snippets/MatrixBase_part.cpp
Normal file
8
doc/snippets/MatrixBase_part.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
Matrix3d m = Matrix3i::zero();
|
||||
m.part<Eigen::StrictlyUpper>().setOnes();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl
|
||||
<< "taking advantage of the symmetry." << endl;
|
||||
Matrix3d n;
|
||||
n.part<Eigen::SelfAdjoint>() = (m*m.adjoint()).lazy();
|
||||
cout << "The result is:" << endl << n << endl;
|
||||
Reference in New Issue
Block a user