c++矩阵运算库Eigen

摘要:
因为我在看PCA,所以我看到了矩阵运算库Engine。

因为在看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

免责声明:文章转载自《c++矩阵运算库Eigen》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Docker php安装扩展步骤详解linux用户,用户组,文件权限下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

神经网络实现

转自  http://www.cnblogs.com/heaad/archive/2011/03/07/1976443.html 神经网络实现    1. 数据预处理         在训练神经网络前一般需要对数据进行预处理,一种重要的预处理手段是归一化处理。下面简要介绍归一化处理的原理与方法。 (1) 什么是归一化?  数据归一化,就是将数据映射到[0,...

Minimum Snap轨迹规划详解(3)闭式求解

如果QP问题只有等式约束没有不等式约束,那么是可以闭式求解(close form)的。闭式求解效率要快很多,而且只需要用到矩阵运算,不需要QPsolver。 这里介绍Nicholas Roy文章中闭式求解的方法。 1. QP等式约束构建 闭式法中的Q 矩阵计算和之前一样(参照文章一),但约束的形式与之前略为不同,在之前的方法中,等式约束只要构造成[......

MATLAB入门教程

MATLAB入门教程 1.MATLAB的基本知识 1-1、基本运算与函数 在MATLAB下进行基本数学运算,只需将运算式直接打入提示号(>>)之後,并按入Enter键即可。例如: >> (5*2+1.3-0.8)*10/25 ans =4.2000 MATLAB会将运算结果直接存入一变数ans,代表MATLAB运算後的答案(Answ...

关于Eigen的数据类型和矩阵维度报错

1. 数据类型报错 /home/wy/workdir/slambook/ch3/useEigen/build> make -j2 Scanning dependencies of target eigenMatrix [ 50%] Building CXX object CMakeFiles/eigenMatrix.dir/eigenMatrix.c...

Rotate Matrix 旋转矩阵性质分析

博客转载自:http://www.cnblogs.com/caster99/p/4703033.html 学过矩阵理论或者线性代数的肯定知道正交矩阵(orthogonal matrix)是一个非常好的矩阵,为什么这么说?原因有一下几点: 正交矩阵每一列都是单位矩阵,并且两两正交。最简单的正交矩阵就是单位阵。 正交矩阵的逆(inverse)等于正交矩阵的转...

Numpy入门学习之(二)linalg库----向量范数、矩阵范数、行列式、矩阵逆、幂

转自:https://blog.csdn.net/qq_30138291/article/details/76327051   老师课堂总结,请勿转载 Numpy中的核心线性代数工具 numpy.linalg模块包含线性代数的函数。使用这个模块,我们可以计算逆矩阵、求特征值、解线性方程组以及求解行列式等。 求解矩阵的范数 在实数域中,数的大小和两个数之间的...