mesytec-mnode/external/taskflow-3.8.0/3rd-party/eigen-3.3.7/doc/snippets/MatrixBase_selfadjointView.cpp

7 lines
361 B
C++
Raw Normal View History

2025-01-04 01:25:05 +01:00
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;