c++矩阵运算库Eigen

因为在看PCA,看到了矩阵运算库Engine。

官网教程:http://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html

 Eigen简单上手使用

要实现相应的功能只需要包含头相应的头文件即可:

Core
#include <Eigen/Core>
Matrix and Array classes, basic linear algebra (including triangular and selfadjoint products), array manipulation
Geometry
#include <Eigen/Geometry>
Transform, Translation, Scaling, Rotation2D and 3D rotations (Quaternion, AngleAxis)
LU
#include <Eigen/LU>
Inverse, determinant, LU decompositions with solver (FullPivLU, PartialPivLU)
Cholesky
#include <Eigen/Cholesky>
LLT and LDLT Cholesky factorization with solver
Householder
#include <Eigen/Householder>
Householder transformations; this module is used by several linear algebra modules
SVD
#include <Eigen/SVD>
SVD decomposition with least-squares solver (JacobiSVD)
QR
#include <Eigen/QR>
QR decomposition with solver (HouseholderQR, ColPivHouseholderQR, FullPivHouseholderQR)
Eigenvalues
#include <Eigen/Eigenvalues>
Eigenvalue, eigenvector decompositions (EigenSolver, SelfAdjointEigenSolver,ComplexEigenSolver)
Sparse
#include <Eigen/Sparse>
Sparse matrix storage and related basic linear algebra (SparseMatrix, DynamicSparseMatrix,SparseVector)
 
#include <Eigen/Dense>
Includes Core, Geometry, LU, Cholesky, SVD, QR, and Eigenvalues header files
 
#include <Eigen/Eigen>
Includes Dense and Sparse header files (the whole Eigen library)

 基本的矩阵运算只需要包含Dense即可

 

参考博客:https://www.cnblogs.com/goingupeveryday/p/5699053.html

原文链接: https://www.cnblogs.com/juluwangshier/p/12739488.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍;

也有高质量的技术群,里面有嵌入式、搜广推等BAT大佬

    c++矩阵运算库Eigen

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/343258

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年3月2日 上午2:01
下一篇 2023年3月2日 上午2:01

相关推荐