mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Move eigen to third party (#282)
* remove useless statement * Add eigen to third_party dir * remove reducdant lines
This commit is contained in:
11
third_party/eigen/doc/snippets/Triangular_solve.cpp
vendored
Normal file
11
third_party/eigen/doc/snippets/Triangular_solve.cpp
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Matrix3d m = Matrix3d::Zero();
|
||||
m.triangularView<Eigen::Upper>().setOnes();
|
||||
cout << "Here is the matrix m:\n" << m << endl;
|
||||
Matrix3d n = Matrix3d::Ones();
|
||||
n.triangularView<Eigen::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<Eigen::Upper>().solve(n) << endl;
|
||||
cout << "And this is n*m.inverse():\n"
|
||||
<< m.triangularView<Eigen::Upper>().solve<Eigen::OnTheRight>(n);
|
Reference in New Issue
Block a user