【Eigen】How to "install" Eigen?

来源:互联网 发布:淘宝网结婚用品 编辑:程序博客网 时间:2024/06/05 09:40

Eigen:C++矩阵处理工具

1.How to "install" Eigen?

In order to use Eigen, you just need to download and extract Eigen's source code (see the wiki for download instructions). In fact, the header files in the Eigen subdirectory are the only files required to compile programs using Eigen. The header files are the same for all platforms. It is not necessary to use CMake or install anything.

无需安装,只需添加Eigen的目录到工程包含目录中即可

【注意】目录是E:\anzhuang\eigen3整个文件所在的目录!


2.A simple first program

#include <iostream>#include <Eigen/Dense>using Eigen::MatrixXd;int main(){  MatrixXd m(2,2);  m(0,0) = 3;  m(1,0) = 2.5;  m(0,1) = -1;  m(1,1) = m(1,0) + m(0,1);  std::cout << m << std::endl;}

3.参考链接:

博客入门:http://blog.csdn.net/abcjennifer/article/details/7781936

官网链接:http://eigen.tuxfamily.org/dox/GettingStarted.html



0 0
原创粉丝点击