From Eigen
Jump to: navigation, search

Versatility is a defining trait of Eigen as a matrix library.

Eigen supports matrices of very different sizes

Eigen fully supports very small (for example, 3x3) matrices whose size is known at compile time. The typical target audience here is games, graphics, vision, robotics. In this case, you want to avoid dynamic memory allocation and you want loops to be explicitly unrolled. Eigen does all of that. We've always believed that for these use cases, users would not tolerate even the slightest overhead, so our design allows to guarantee zero abstraction penalty for most operations on such small fixed-size objects.

Eigen also fully supports very large (for example, 4000x4000) matrices whose size is obviously not known at compile time. The typical target audience here is scientists. Eigen is also fully optimized for this use case, which means that special attention is paid to cache-friendliness, as our benchmark clearly shows, and to reliability of matrix decomposition algorithms.

Finally, Eigen also has experimental support for sparse matrices, allowing even far larger sizes. Our SparseMatrix class is known to have extremely good performance for basic operations. We also offer some basic sparse matrix decomposition algorithms, while allowing you to use specialized libraries as back-ends to enable higher performance.

Eigen supports many numeric types

Eigen supports all standard numeric types out of the box, including all integer types: char, short, int, long, long long, and their unsigned variants. Eigen also supports complex numbers with std::complex<float> and std::complex<double>.

Eigen is also easily extensible to custom numeric types.

Eigen supports both storage orders

Eigen defaults to column-major storage order for matrices, but that can be chosen on a per-matrix basis, or even globally: see this page.

Eigen completely abstracts the storage order: changing it does not affect semantics in any way, unless you directly address the underlying arrays.

Eigen supports a wide range of applications

From linear algebra to geometry, Eigen supports a variety of use cases that reflects its very diverse user base.

Moreover, its ecosystem of unsupported modules provides many specialized features such as non-linear optimization, matrix functions, a polynomial solver, skyline matrices, FFT, bounded volume hierarchies, and much more.

Eigen runs on a wide range of platforms

Eigen supports many compilers, not requiring a very recent one: the old GCC 3.4 is still supported. Eigen also supports a wide range of hardware architecture, including x86 (32 and 64 bit) with or without SSE, ARM with or without NEON, and POWER (32 and 64 bit) with or without AltiVec.