aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/MatrixBase_selfadjointView.cpp
blob: 4bd3c7eeb2ebaab4d3b9ee7104bd0df0b8e5e174 (plain)
1
2
3
4
5
6
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;