Eigen学习笔记(一)矩阵和向量

Matrix

 all matrices and vectors are objects of the Matrix template class. Vectors are just a special case of matrices, with either 1 row or 1 column.

Matrix<typename Scalar, int RowsAtCompileTime, int ColsAtCompileTime>

Matrix<类型 ,行数,列数>

eg:      typedef Matrix<float, 4, 4> Matrix4f;          //Matrix4f是一个4*4浮点型矩阵        

           typedef Matrix<float, 3, 1> Vector3f;         //列向量

           typedef Matrix<int, 1, 2> RowVector2i;     //行向量

构造函数

没初始化系数时,使用构造函数

eg:     Matrix3f a;

             MatrixXf b;       

            MatrixXf a(10,15);  

            VectorXf b(30);

 

template 例子
row 行  column 列
mandatory  强制性的
dimension 维
dynamic  动态的
compile 编译
variable 变量
fixed  固定的
constuctor 构造函数;构造师
initialize 初始化
coefficient 系数 
accessors 存取器
mutators 访问器