一、关于Eigen
Eigen纯纯头文件,没有.so或者.a的二进制文件,不需要链接库文件。(题外话:今早运行代码vtk的库文件的路径保存好后一直没让他生效,总报错)
Vector3d v_3d;//声明3*1的float矩阵
Matrix<float, 3, 1> vd_3d;// 这是一样的
matrix_23 << 1, 2, 3, 4, 5, 6;// 输入数据(初始化)
cout << "matrix 2x3 from 1 to 6: \n" << matrix_23 << endl;
Matrix<double, 2, 1> result = matrix_23.cast<double>() * v_3d;
cout << "[1,2,3;4,5,6]*[3,2,1]=" << result.transpose() << endl;
//①不是.*,简单的*; ②matrix_23和v_23是float类型(单精度),