From Eigen



https://forms.gle/wpyrxWi18ox9Z5ae9 Please, help us to better know about our user community by answering the following short survey:

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

Overview

Documentation

Requirements

Eigen doesn't have any dependencies other than the C++ standard library.

We use the CMake build system, but only to build the documentation and unit-tests, and to automate installation. If you just want to use Eigen, you can use the header files right away. There is no binary library to link to, and no configured header file. Eigen is a pure template library defined in the headers.

License

Eigen is Free Software. Starting from the 3.1.1 version, it is licensed under the MPL2, which is a simple weak copyleft license. Common questions about the MPL2 are answered in the official MPL2 FAQ.

Earlier versions were licensed under the LGPL3+.

Note that currently, a few features rely on third-party code licensed under the LGPL: SimplicialCholesky, AMD ordering, and constrained_cg. Such features can be explicitly disabled by compiling with the EIGEN_MPL2_ONLY preprocessor symbol defined. Furthermore, Eigen provides interface classes for various third-party libraries (usually recognizable by the <Eigen/*Support> header name). Of course you have to mind the license of the so-included library when using them.

Virtually any software may use Eigen. For example, closed-source software may use Eigen without having to disclose its own source code. Many proprietary and closed-source software projects are using Eigen right now, as well as many BSD-licensed projects.

See the MPL2 FAQ for more information, and do not hesitate to contact us if you have any questions.

Compiler support

Eigen is standard C++98 and so should theoretically be compatible with any compliant compiler. Whenever we use some non-standard feature, that is optional and can be disabled.

Eigen is being successfully used with the following compilers:

GCC, version 4.8 and newer. Older versions of gcc might work as well but they are not tested anymore.

MSVC (Visual Studio), 2012 and newer. Be aware that enabling IntelliSense (/FR flag) is known to trigger some internal compilation errors. The old 3.2 version of Eigen supports MSVC 2010, and the 3.1 version supports MSVC 2008.

Intel C++ compiler. Enabling the -inline-forceinline option is highly recommended.

option is highly recommended. LLVM/CLang++, version 3.4 and newer. (The 2.8 version used to work fine, but it is not tested with up-to-date versions of Eigen)

XCode 7 and newer. Based on LLVM/CLang.

MinGW, recent versions. Based on GCC.

QNX's QCC compiler.

Regarding performance, Eigen performs best with compilers based on GCC or LLVM/Clang. See this page for some known compilation issues.

Get support

Need help using Eigen? Try this:

To get help, stackoverflow is your best resource. You can also search within the forum archives.

You can always try our IRC channel.

Want to discuss something with the developers? Use our mailing list.

Bug reports

For bug reports and feature requests, please use the issue tracker. See this page for some instructions.

Mailing list

Address: eigen@lists.tuxfamily.org

To subscribe, send a mail with subject subscribe to eigen-request@lists.tuxfamily.org

to eigen-request@lists.tuxfamily.org To unsubscribe, send a mail with subject unsubscribe to eigen-request@lists.tuxfamily.org

The Eigen mailing list can be used for discussing general Eigen development topics. End-user questions are often better asked on the Users Forum. Development of specific features is best tracked and discussed on our Bugzilla. See this page.

This mailing list is public and has public archives. The archives are mirrored by gmane.org .

Important: You must subscribe before you may post. Sorry, this is our only way to prevent spam.

Important: After you sent your subscription request, you will receive a confirmation e-mail. Check your spam folder, as these confirmation e-mails are often filtered as spam!

There is also a private mailing list which should only be used if you want to write privately to a few core developers (it is read by Gaël, Jitse and Christoph). The address is eigen-core-team at the same lists server as for the Eigen mailing list. You do not need to subscribe (actually, subscription is closed). For all Eigen development discussion, use the public mailing list or Bugzilla instead.

IRC Channel

Our IRC channel is #eigen on irc.freenode.net.

Everybody's welcome to discuss Eigen-related topics or just chat. Some quick Eigen development chat happens over IRC, but the main place for Eigen development discussion remains the Eigen mailing list. Some user support also happens over IRC, but the main place for Eigen user support is the Users Forum.

Contributing to Eigen

Eigen is written and maintained by volunteers. You can contribute in many ways to help: give support to new users, write and improve documentation, helping with bugs and other issues in bugzilla, discussing the design and the API, running tests and writing code. See our page on Contributing to Eigen for pointers to get you started.

Projects using Eigen

Feel free to add yourself! If you don't have access to the wiki or if you are not sure about the relevance of your project, ask at the #Mailing list.

Extensions, numerical computation

Google's TensorFlow is an Open Source Software Library for Machine Intelligence

Google's Ceres solver is a portable C++ library that allows for modeling and solving large complicated nonlinear least squares problems.

The Manifold ToolKit MTK provides easy mechanisms to enable arbitrary algorithms to operate on manifolds. It also provides a Sparse Least Squares Solver (SLoM) and an Unscented Kalman Filter (UKFoM).

IFOPT is a modern, light-weight, Eigen-based C++ interface to Nonlinear Programming solvers, such as Ipopt and Snopt.

CppNumericalSolvers is a lightweight header-only library for non-linear optimization including various solvers: CG, L-BGFS-B, CMAes, Nelder-Mead.

GTSAM is a library implementing smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks.

g2o is an open-source C++ framework for optimizing graph-based nonlinear least-square problems.

redsvd is a RandomizED Singular Value Decomposition library for sparse or very large dense matrices.

trustOptim is a trust-region based non linear solver supporting sparse Hessians (C++ implementation with R binding).

Shogun: a large scale machine learning toolbox.

Stan: a statistical package based on Eigen that includes a reverse-mode automatic differentiation implementation.

StOpt, the STochastic OPTimization library aims at providing tools in C++ for solving some stochastic optimization problems encountered in finance or in the industry.

Nelson an open computing environment for engineering and scientific applications using modern C/C++ libraries (Boost, Eigen, FFTW, …) and others state of art numerical libraries. (GPL2)

EigenLab is a header only library to parse and evaluate expressions working on Eigen matrices.

SpaFEDte a C++ library for discontinuous Galerkin discretizations on general meshes.

biicode a C and C++ dependency manager that #includes the most popular and useful C/C++ libs and frameworks.

CERTH's AKSDA: a GPU-accelerated dimensionality reduction and classification method for high-dimensional data.

Spectra stands for Sparse Eigenvalue Computation Toolkit as a Redesigned ARPACK. It is a header-only C++ library for large scale eigenvalue problems, built on top of Eigen.

preCICE is a coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations. It supports OpenFOAM, CalculiX, SU2, and several other well-known, as well as in-house solvers. It is free/open-source software and its code is available on GitHub under the LGPL3 license. Link to source code and documentation

Bindings

The RcppEigen package provides bindings and more for R.

minieigen is small boost::python wrapper for Eigen's core classes (dense fixed and dynamic-sized vectors, matrices, aligned boxes, quaternions; with integer, floating and complex scalars) including operators and subset of Eigen's API methods.

Eigency is a Cython interface between the numpy arrays and the Matrix/Array classes of the Eigen C++ library.

sparray: a python binding of the Sparse module - alpha stage.

OCamlEigen, a thin OCaml interface to the Eigen 3 C++ library.

haskell-eigen offers bindings for the Haskell language.

jeigen, a Java wrapper for Eigen.

Eigen4AutoIt, a wrapper for the AutoIt scripting language.

eigen-lua, a Lua wrapper around parts of the Eigen numerical library.

Eigenpy: Efficient bindings between Numpy and Eigen using Boost.Python with support of the Geometry module

Science

Robotics and engineering

Computer Graphics, Geometry, Visualization

Mobile apps

Layar, an augmented reality application for IPhone and Android.

Red Sword Studios, maker of the iPhone games Gradient, Fortress Luna, Stimulus, and Lustre, uses Eigen extensively. Why roll your own matrix/vector/transformation code when there's Eigen?

WhirlyGlobe-Maply an open source geospatial display toolkit for iOS and Android. It implements both a 3D interactive globe and a 2D (slippy) map

KDE (our origins!)

Step, an educational physics simulator.

Calligra Sheets, the spreadsheet module of KDE's office suite uses Eigen for matrix functions such as MINVERSE, MMULT, MDETERM.

Krita, a professional free and open-source painting program

Kalzium uses Eigen indirectly through the aforementioned Avogadro library.

the Mandelbrot wallpaper plugin, some screensavers, kgllib, solidkreator, etc.



If you are aware of some interesting projects using Eigen, please send us a message (including a link and short description) or directly edit this wiki page!

Credits

The Eigen project was started by Benoît Jacob (founder) and Gaël Guennebaud (guru). Many other people have since contributed their talents to help make Eigen successful. Here's an alphabetical list: (note to contributors: do add yourself!)

Philip Avery Fix bug and add functionality to AutoDiff module Abraham Bachrach Added functions for cwise min/max with a scalar Sebastien Barthelemy Fix EIGEN_INITIALIZE_MATRICES_BY_NAN Carlos Becker Wrote some of the pages of the tutorial David Benjamin Artwork: the owls Cyrille Berger Fix error in logic of installation script Armin Berres Lots of fixes (compilation warnings and errors) Jose Luis Blanco Build fixes for MSVC and AMD64, correction in docs Mark Borgerding FFT module Romain Bossart Updates to Sparse solvers Kolja Brix Added docs to Householder module, fixes for ARPACK wrapper, KroneckerProduct and GMRES Gauthier Brun Making a start with a divide-and-conquer SVD implementation Philipp Büttgenbach Bug fix when differentiating a one-dimensional spline Thomas Capricelli Migration to mercurial, Non-linear optimization and numerical differentiation, cron-job to update the online dox Nicolas Carre Making a start with a divide-and-conquer SVD implementation Jean Ceccato Making a start with a divide-and-conquer SVD implementation Vladimir Chalupecky CMake fix Benjamin Chrétien Bug fix for PolynomialSolver (linear polynomials), various typos Andrew Coles Fixes (including a compilation error) Jeff "complexzeros" Spline interpolation with derivatives Marton Danoczy MSVC compilation fix, support for ARM NEON with Clang 3.0 and LLVM-GCC Jeff Dean Fix in vectorized square root for small arguments Georg Drenkhahn CMake and STL fixes Christian Ehrlicher MSVC compilation fix Martinho Fernandes Make our aligned allocator support C++11 Daniel Gomez Ferro Improvements in Sparse and in matrix product Rohit Garg Vectorized quaternion and cross products, improved integer product Mathieu Gautier QuaternionMap and related improvements Anton Gladky Visual Studio 2008 and GCC 4.6 compilation fixes Stuart Glaser Prevent allocations in LU decomposition Marc Glisse C++11 compilation issues (suffices for literals) Frederic Gosselin Improve filter for hidden files in CMake Christoph Grüninger Add SuperLU 5 support Gaël Guennebaud Core developer Philippe Hamelin Allow CMake project to be included in another project Marcus D. Hanwell CMake improvements. Marcus is a developer at Kitware! David Harmon Arpack support module Chen-Pang He Many improvements to MatrixFunctions and KroneckerProduct modules Hauke Heibel Extended matrix functions, STL compatibility, Splines, CMake improvements, and more ... Christoph Hertzberg Quaternions, shifts for Cholmod, bug fixes, lots of user support on forums and IRC Pavel Holoborodko Multi-precision support with MPFR C++, bug fixes for non-standard scalar types Tim Holy Improvements to tutorial, LDLT update and downdate Intel Back-end to Intel Math Kernel Library (MKL) Trevor Irons Square root for complex numbers, fix compile errors and mistake in docs Benoît Jacob Core developer Bram de Jong Improvement to benchmark suite Kibeom Kim Implement *= /= * / operations for VectorwiseOp Moritz Klammler Avoid memory leak when constructor of user-defined type throws exception Claas Köhler Improvements to Fortran and FFTW in CMake Alexey Korepanov Add RealQZ class Igor Krivenko Properly cast constants when using non-standard scalars Marijn Kruisselbrink CMake fixes Abhijit Kundu Fix compilation errors in OpenGL demos Moritz Lenz Allow solving transposed problem with SuperLU Bo Li Fix bugs in Spline constructor Sebastian Lipponer MSVC compilation support Daniel Lowenberg Add SparseView class David J. Luitz Bug fix for sparse * dense matrix product Naumov Maks Bug fix in polynomial solver test Angelos Mantzaflaris Fix to allow IncompleteLUT to be used with MPFR D J Marcin Fix operator& precedence bug Konstantinos A. Margaritis AltiVec/VSX, ARM NEON (32-bit/64-bit) and S390x SIMD (ZVector) vectorization Roger Martin Component-wise arc tangent function Ricard Marxer Reverse, redux improvements, the count() method, some dox Vincenzo Di Massa CMake fix Christian Mayer Early code review and input in technical/design discussions Frank Meier-Dörnberg MSVC compatibility fixes Keir Mierle LDLT decomposition and other improvements, help with MPL relicensing Laurent Montel CMake improvements. Laurent is (with Alexander) one of the CMake gurus at KDE! Eamon Nerbonne Compilation fixes for win32 Alexander Neundorf CMake improvements. Alexander is (with Laurent) one of the CMake gurus at KDE! Jason Newton Componentwise tangent functions Jitse Niesen Matrix functions, large improvements in the Eigenvalues module and in the docs, and more ... Desire Nuentsa Many improvements to Sparse module: SparseLU, SparseQR, ILUT, PaStiXSupport, … Jan Oberländer Compatibility with termios.h Jos van den Oever Compilation fix Michael Olbrich Early patches, including the initial loop meta-unroller Simon Pilgrim Optimizations for NEON Bjorn Piltz Visual C compilation fix Benjamin Piwowarski Add conservativeResize() for sparse matrices Zach Ploskey Copy-editing of tutorial Giacomo Po MINRES iterative solver Sergey Popov Fix bug in SelfAdjointEigenSolver Manoj Rajagopalan Introduce middleRows() / middleCols(), bug fix for nonstandard numeric types Stjepan Rajko MSVC compatibility fix Jure Repinc CMake fixes Kenneth Frank Riddile Lots of Windows/MSVC compatibility fixes, handling of alignment issues Richard Roberts Bug fix in selection of MKL Householder QR Adolfo Rodriguez Prevent allocations in matrix decompositions Peter Román Support for SuperLU's ILU factorization Oliver Ruepp Bug fix in sparse matrix product with row-major matrices Radu Bogdan Rusu Fix compilation warning Guillaume Saupin Skyline matrices Olivier Saut Typo in documentation Benjamin Schindler gdb pretty printers Michael Schmidt Fix in assembly when identifying CPU, Compilation fix connected to min/max Dennis Schridde New typedefs like AlignedBox3f Jakob Schwendner Test for unaligned quaternions, Benchmark for Geometry module Christian Seiler The Tensor module Martin Senst Bug fix for empty matrices Sameer Sheorey Fix gdb pretty printer for variable-size matrices Andy Somerville Functions to get intersection between two ParametrizedLines Alex Stapleton Help with tough C++ questions Benoit Steiner Faster matrix multiplication, Tensor module, CUDA Sven Strothoff Add intersects() method to AlignedBox Leszek Swirski Fix oversight in installation scripts Adam Szalkowski Bug fix in MatrixBase::makeHouseholder() Silvio Traversaro Fix for FindEigen3.cmake Piotr Trojanek QCC compilation fixes Anthony Truchet Bugfix in QTransform and QMatrix support Adolfo Rodriguez Tsourouksdissian Version of JacobiSVD that pre-allocates its resources James Richard Tyrer CMake fix Rhys Ulerich Pkg-config support, improved GDB pretty-printer Henry de Valence Typo in documentation Ingmar Vanhassel CMake fix Michiel Van Dyck Multi-threading documentation bug fix Scott Wheeler Documentation improvements Freddie Witherden CMake fixes, allow LevenbergMarquardt to work with non-standard types Urs Wolfer Fixed a serious warning Manuel Yguel Bug fixes, work on inverse-with-check, the Polynomial module Pierre Zoppitelli Making a start with a divide-and-conquer SVD implementation Jonas Adler Bugfixes for CUDA support

Eigen is also using code that we copied from other sources. They are acknowledged in our sources and in the Mercurial history, but let's also mention them here:

Intel Corporation SSE code for 4x4 matrix inversion taken from here. Tim Davis AMD reordering simplicial sparse Cholesky factorization adapted from SuiteSparse Julien Pommier SSE implementation of exp,log,cos,sin math functions from GMM++ Yousef Saad IncompleteLUT preconditioner coming from ITSOL Minpack authors Algorithms for non linear optimization.

Special thanks to Tuxfamily for the wonderful quality of their services, and the GCC Compile Farm Project that gives us access to many various systems including ARM NEON.

If you are looking for a BibTeX entry to use to cite Eigen in academic papers, see the BibTeX page.