---
title: "使用Eigen库处理线性代数问题"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/eigen-library-linear-algebra/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/06-数据算法与工程数学/使用Eigen库处理线性代数问题.md"
content_hash: 70f49f687b407b7be48244130cd03520b09a6675edb6d1f94b5b9e8ccf5f7601
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 使用Eigen库处理线性代数问题

> 创建时间：2024/1/14 15:17

## Overview

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

Eigen一个重要特点是没有什么依赖的库，本身仅有许多头文件组成，因此非常轻量而易于跨平台。你要做的就是把用到的头文件和你的代码放在一起就可以了。

## VS Project中配置

  1. 下载：http://eigen.tuxfamily.org/index.php?title=Main_Page
  2. 解压后将Eigen subdirectory解压到方便的位置
  3. 新建VS Console Project
  4. 右键相应的Project -> Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories 。 将Eigen文件夹的父目录路径加进去
  5. `#include "Eigen/Dense"` 即可开始试用

## Demos

```cpp
string str1 = &quot;test&quot;;
string str2 = &quot;test&quot;;

```
```cpp
string str1 = &quot;test&quot;;
string str2 = &quot;test&quot;;

```

### 更多相关文章

https://blog.csdn.net/wokaowokaowokao12345/article/details/53397488
https://blog.csdn.net/Lu_gl/article/details/107098388
https://blog.csdn.net/Robot_Starscream/article/details/102306559

## Ref

http://eigen.tuxfamily.org/dox/GettingStarted.html

C++矩阵运算库推荐 https://my.oschina.net/cvnote/blog/165340
