开发者社区> 问答> 正文

C++使用Eigen库如何求解非方阵的广义逆矩阵?类似matlab的pinv函数

C++使用Eigen库如何求解非方阵的广义逆矩阵?类似matlab的pinv函数?
运算量很大,所以必须使用库函数哦~~可以麻烦一点,不一定一个函数解决
非常感谢!很急!

展开
收起
a123456678 2016-03-06 10:36:02 6015 0
1 条回答
写回答
取消 提交回答
  • x = A.ldlt().solve(b)); // A sym. p.s.d. #include
    x = A.llt() .solve(b)); // A sym. p.d. #include
    x = A.lu() .solve(b)); // Stable and fast. #include
    x = A.qr() .solve(b)); // No pivoting. #include
    x = A.svd() .solve(b)); // Stable, slowest. #include
    // .ldlt() -> .matrixL() and .matrixD()
    // .llt() -> .matrixL()
    // .lu() -> .matrixL() and .matrixU()
    // .qr() -> .matrixQ() and .matrixR()
    // .svd() -> .matrixU(), .singularValues(), and .matrixV()

    2019-07-17 18:54:12
    赞同 展开评论 打赏
问答分类:
C++
问答地址:
问答排行榜
最热
最新

相关电子书

更多
使用C++11开发PHP7扩展 立即下载
GPON Class C++ SFP O;T Transce 立即下载
GPON Class C++ SFP OLT Transce 立即下载