You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

11 lines
545 B

Matrix3d m = Matrix3d::Zero();
m.triangularView<StormEigen::Upper>().setOnes();
cout << "Here is the matrix m:\n" << m << endl;
Matrix3d n = Matrix3d::Ones();
n.triangularView<StormEigen::Lower>() *= 2;
cout << "Here is the matrix n:\n" << n << endl;
cout << "And now here is m.inverse()*n, taking advantage of the fact that"
" m is upper-triangular:\n"
<< m.triangularView<StormEigen::Upper>().solve(n) << endl;
cout << "And this is n*m.inverse():\n"
<< m.triangularView<StormEigen::Upper>().solve<StormEigen::OnTheRight>(n);