转置、伴随、行列式、逆矩阵
小矩阵(4 * 4及以下)eigen会自动优化,默认采用LU分解,效率不高
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2d c; c << 1, 2, 3, 4; //转置、伴随 std::cout<<c<<std::endl<<std::endl; std::cout<<"转置 "<<c.transpose()<<std::endl<<std::endl; std::cout<<"伴随 "<<c.adjoint()<<std::endl<<std::endl; //逆矩阵、行列式 std::cout << "行列式: " << c.determinant() << std::endl; std::cout << "逆矩阵 " << c.inverse() << std::endl; }
有关eigen库的一些基本使用方法 - CSDN博客 https://blog.csdn.net/r1254/article/details/47418871
行列式的本质:行列式的本质是什么? - 知乎 https://www.zhihu.com/question/36966326/answer/70687817