1*bf2c3715SXin Li Matrix3d m = Matrix3d::Zero(); 2*bf2c3715SXin Li m.triangularView<Eigen::Upper>().setOnes(); 3*bf2c3715SXin Li cout << "Here is the matrix m:\n" << m << endl; 4*bf2c3715SXin Li Matrix3d n = Matrix3d::Ones(); 5*bf2c3715SXin Li n.triangularView<Eigen::Lower>() *= 2; 6*bf2c3715SXin Li cout << "Here is the matrix n:\n" << n << endl; 7*bf2c3715SXin Li cout << "And now here is m.inverse()*n, taking advantage of the fact that" 8*bf2c3715SXin Li " m is upper-triangular:\n" 9*bf2c3715SXin Li << m.triangularView<Eigen::Upper>().solve(n) << endl; 10*bf2c3715SXin Li cout << "And this is n*m.inverse():\n" 11*bf2c3715SXin Li << m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n); 12