Day2 : SLAM Eigen库的入门学习教程(CS2240 Interactive Computer Graphics)

这篇教程介绍了Eigen库的基础知识,包括安装、矩阵和向量的初始化、基本线性代数操作如加减乘除、矩阵的转置和逆。适合有C++基础和线性代数知识的读者,旨在帮助读者理解和应用Eigen库来创建图形应用。
摘要由CSDN通过智能技术生成

Eigen库介绍

Eigen is an open-source linear algebra library implemented in C++. It’s fast and well-suited for a
wide range of tasks, from heavy numerical computation, to simple vector arithmetic. The goal of
this tutorial is to introduce the features of Eigen required for implementing graphics applications,
to readers possessing basic knowledge of C++, linear algebra, and computer graphics.

Eigen库是适用C++的开源线性代数库,进行复杂的数值计算简化向量计算。教程的目的在于实现Eigen库的简单应用,需要我们的读者有C++基础,线性代数以及计算机图形学。

教程目标

After reading this tutorial, the reader should be able to

  1. Install Eigen on computers running Linux, Mac OS, and Windows.
  2. Create and initialize matrices and vectors of any size with Eigen in C++.
  3. Use Eigen for basic algebraic operations on matrices and vectors. The reader should be
    able to perform addition, multiplication, scalar multiplication, and matrix inversion and
    transposition.
  4. Use Eigen’s built-in functions to create 4x4 transformation matrices.

在学习完教程后,读者可以完成

  • 在不同环境下Eigen库的安装
  • 在C++中创建或初始化任意大小的矩阵和矢量
  • 使用Eigen库进行最基本的线性代数操作,加减乘除,标量乘,矩阵的逆和转置
  • 使用Eigen库的内置函数创建转置矩阵

安装Eigen库

$ cd ~
$ git clone https :// github .com/ eigenteam /eigen -git - mirror

验证是否安装成功

std::cout << " Eigen version : " << EIGEN_MAJOR_VERSION << "."<< EIGEN_MINOR_VERSION << std::endl ;

会在我们的终端中显示出来版本。

Eigen version : 4.99

遇到没有找到文件的情况要Fatal error :Eigen/core没有那个文件或目录

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

肥鼠路易

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值