LoginSignup
17
15

More than 5 years have passed since last update.

C++の行列ライブラリEigenで逆行列を求めるときの注意

Last updated at Posted at 2013-09-27

Eigen/LUもinclude しないとだめ。Eigen/Coreに逆行列 .inverse()と行列式 .determinant() は入ってない

#include <Eigen/Core>
#include <Eigen/LU>

cannot find xxx.inverse()/determinant() みたいな親切なエラーメッセージは出てこないので、意外とハマった。templateのエラー読むのつらい

過去に二回くらいはまってる気がする

Eigenって何 → http://eigen.tuxfamily.org/index.php?title=Main_Page

2013/09/27 補足:

現実的なケースでは、逆行列を求めるのに.inverse()は使わず、LU分解なりQR分解なりを使います
http://eigen.tuxfamily.org/dox/group__TutorialLinearAlgebra.html

17
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
15