Files
Polyhedron/external/eigen-3.4.0/doc/snippets/MatrixBase_selfadjointView.cpp
T
Efim Beshmenev 7f9dc067a1 Initial commit
2026-07-10 19:16:42 +03:00

7 lines
361 B
C++

Matrix3i m = Matrix3i::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the symmetric matrix extracted from the upper part of m:" << endl
<< Matrix3i(m.selfadjointView<Upper>()) << endl;
cout << "Here is the symmetric matrix extracted from the lower part of m:" << endl
<< Matrix3i(m.selfadjointView<Lower>()) << endl;