Submit a comment to an "Available C++ Libraries FAQ" entry
Category
Libraries available to download (D-L)
eigen - C++ template library for linear algebra: vectors, matrices & related algorithms
Eigen is a C++ template library for linear algebra: vectors, matrices, and related algorithms. It is:
Versatile. (See modules and tutorial). Eigen handles, without code duplication, and in a completely integrated way:
both fixed-size and dynamic-size matrices and vectors.
both dense and sparse (the latter is still experimental) matrices and vectors.
both plain matrices/vectors and abstract expressions.
both column-major (the default) and row-major matrix storage.
both basic matrix/vector manipulation and many more advanced,
specialized modules providing algorithms for linear algebra, geometry, quaternions, or advanced array manipulation.
various numeric types out of the box, including std::complex numbers, while being easy to extend to custom numeric types.
Fast. (See benchmark).
Expression templates allow to intelligently remove temporaries and enable lazy evaluation, when that is appropriate -- Eigen takes care of this automatically and handles aliasing too in most cases.
Explicit vectorization is performed for the SSE (2 and later) and AltiVec instruction sets, with graceful fallback to non-vectorized code. Expression templates allow to perform these optimizations globally for whole expressions.
With fixed-size objects, dynamic memory allocation is avoided, and the loops are unrolled when that makes sense.
For large matrices, special attention is paid to cache-friendliness.
Elegant. (See API showcase). The API is extremely clean and expressive, thanks to expression templates. Implementing an algorithm on top of Eigen feels like just copying pseudocode. You can use complex expressions and still rely on Eigen to produce optimized code: there is no need for you to manually decompose expressions into small steps.
Compiler-friendy. Eigen has very reasonable compilation times at least with GCC, compared to other C++ libraries based on expression templates and heavy metaprogramming. Eigen is also standard C++ and supports various compilers.
Licensing : Open Source
Do not expect an immediate response - the contents of this form
will be added to a queue, which I process manually
about once a week. If you don't fill in
your email address correctly, you will not (obviously) get any reply at
all. Other invalid information may result in a mailed request for
clarification.
Enter your comment in the areas provided below. Be sure to
include your name and email address.
Please don't bother trying to post spam or links to dodgy web sites - everything
you post here is reviewed by a human being before being released for public
viewing.