There are three ways to set up Eigen
:
- install from package managers (for Mac and Ubuntu)
- download library release (for all OSs)
- download source and install (for all OSs)
Below, we discuss these options in detail
Use the Mac's package manager brew
for installation
$ brew install eigen
The repository can be downloaded from
http://eigen.tuxfamily.org/index.php?title=Main_Page#Download
- Download the compressed file (e.g.,
eigen-3.*.*.zip
) and extract it. This result in a directoryeigen-3.*.*
- Put the extracted directory under the
external
directory asacg-<username>/external/eigen-3.*.*
.
Make sure you have a header file Dense
at
acg-<username>/external/eigen-3.*.*/Eigen/Dense
Instead of download, you can clone the Eigen
repository.
$ git submodule update --init external/eigen # clone the "eigen" repository
Make sure you have a header file Dense
at
acg-<username>/external/eigen/Eigen/Dense
For ubuntu, install eigen
using apt-get
as
$ sudo apt-get install libeigen3-dev
The repository can be downloaded from here:
http://eigen.tuxfamily.org/index.php?title=Main_Page#Download
- Download the compressed file (e.g.,
eigen-3.*.*.zip
) and extract it. This result in a directoryeigen-3.*.*
- Put the extracted file under the
external
directory asacg-<username>/external/eigen-3.*.*
.
Make sure you have a header file Dense
at
acg-<username>/external/eigen-3.*.*/Eigen/Dense
The only difference is that instead of download we use submodule to clone the Eigen
repository.
$ git submodule update --init external/eigen # clone the "eigen" repository (this may take one or two mins)
Make sure you have a header file Dense
at
acg-<username>/external/eigen/Eigen/Dense
Download the repository from here
http://eigen.tuxfamily.org/index.php?title=Main_Page#Download
- Download the compressed file (e.g.,
eigen-3.*.*.zip
) and extract it. This result in a directoryeigen-3.*.*
- Put the extracted file under the
external
directory asacg-<username>/external/eigen-3.*.*
.
Make sure you have a header file Dense
at
acg-<username>/external/eigen-3.*.*/Eigen/Dense
The only difference is that instead of download we use submodule to clone the Eigen
repository.
$ git submodule update --init external/eigen # clone the "eigen" repository (this may take one or two mins)
Make sure you have a header file Dense
at
acg-<username>/external/eigen/Eigen/Dense
For this course, the installation procedure above is enough. But the eigen
can be further optimized for your environment by configuring the library.
To configure the eigen
library, type the commands below
$ cd external/eigen # move to the eigen repository
$ mkdir build # make a directory for "out-of-source build"
$ cd build # move to the new directory
$ cmake .. # configure (this may take one or two mins)
$ cmake --install . --prefix ../../eigenlib # install eigen into the "eigenlib" folder
Make sure you have a header file Dense
at
acg-<username>/external/eigenlib/include/eigen3/Eigen/Dense