参考
http://eigen.tuxfamily.org/dox/classEigen_1_1Matrix.html
1.Matrix 矩阵
矩阵类多用于单列vector和单行的vector,多用于密集型矩阵或者vectors容器。Vector是只有一列的矩阵,row-vector是只有一行的矩阵。可以定义为固定大小或者动态大小。
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >
The matrix class, also used for vectors and row-vectors.
The Matrix class is the work-horse for all dense (note) matrices and vectors within Eigen. Vectors are matrices with one column, and row-vectors are matrices with one row.
The Matrix class encompasses both fixed-size and dynamic-size objects (note).
The first three template parameters are required:(类型,行、列)
Template Parameters
| _Scalar@anchor | matrix_tparam_scalar Numeric type, e.g. float, double, int or std::complex<float>. User defined sclar types are supported as well (see here). |
| _Rows | Number of rows, or Dynamic |
| _Cols | Number of columns, or Dynamic |
2.定义类型
Typedefs |
|
| typedef Matrix< std::complex < double >, 2, 2 > |
Matrix2cd |
| typedef Matrix< std::complex < float >, 2, 2 > |
Matrix2cf |
| typedef Matrix< double, 2, 2 > | Matrix2d |
| typedef Matrix< float, 2, 2 > | Matrix2f |
| typedef Matrix< int, 2, 2 > | Matrix2i |
| typedef Matrix< std::complex < double >, 2, Dynamic > |
Matrix2Xcd |
| typedef Matrix< std::complex < float >, 2, Dynamic > |
Matrix2Xcf |
| typedef Matrix< double, 2, Dynamic > |
Matrix2Xd |
| typedef Matrix< float, 2, Dynamic > | Matrix2Xf |
| typedef Matrix< int, 2, Dynamic > | Matrix2Xi |
| typedef Matrix< std::complex < double >, 3, 3 > |
Matrix3cd |
| typedef Matrix< std::complex < float >, 3, 3 > |
Matrix3cf |
| typedef Matrix< double, 3, 3 > | Matrix3d |

本文介绍了Eigen库中的Matrix类,用于处理密集矩阵和向量。Matrix类支持固定大小和动态大小的对象,是Eigen中矩阵和向量操作的基础。模板参数包括元素类型、行数和列数。

2032

被折叠的 条评论
为什么被折叠?



