Difference between revisions of "Main Page"

From Eigen
Jump to: navigation, search
Line 5: Line 5:
 
Date: October 22, 2009
 
Date: October 22, 2009
 
<div style="font-size: 14pt">
 
<div style="font-size: 14pt">
Eigen 2.0.7 released!
+
Eigen 2.0.8 released!
 
</div>
 
</div>
 
For details, see the [[ChangeLog]]. The next major version is also under heavy development.
 
For details, see the [[ChangeLog]]. The next major version is also under heavy development.
Line 50: Line 50:
 
== Download ==
 
== Download ==
  
The '''latest stable release''' is Eigen 2.0.7. Get it here:
+
The '''latest stable release''' is Eigen 2.0.8. Get it here:
[http://bitbucket.org/eigen/eigen2/get/2.0.7.tar.bz2 tar.bz2],
+
[http://bitbucket.org/eigen/eigen2/get/2.0.8.tar.bz2 tar.bz2],
[http://bitbucket.org/eigen/eigen2/get/2.0.7.tar.gz tar.gz],
+
[http://bitbucket.org/eigen/eigen2/get/2.0.8.tar.gz tar.gz],
[http://bitbucket.org/eigen/eigen2/get/2.0.7.zip zip].
+
[http://bitbucket.org/eigen/eigen2/get/2.0.8.zip zip].
  
 
More generally, if you want release x.y.z in, say, tar.bz2 format, just use the URL
 
More generally, if you want release x.y.z in, say, tar.bz2 format, just use the URL
Line 82: Line 82:
 
  hg up 2.0
 
  hg up 2.0
  
If instead you want the '''2.0.7 tag''', enter the eigen2/ directory and do:
+
If instead you want the '''2.0.8 tag''', enter the eigen2/ directory and do:
  hg up 2.0.7
+
  hg up 2.0.8
  
 
For more information about using Mercurial with Eigen, see [[Developer's_Corner#Mercurial_workflow|this page]].
 
For more information about using Mercurial with Eigen, see [[Developer's_Corner#Mercurial_workflow|this page]].

Revision as of 22:49, 23 October 2009

Date: October 22, 2009

Eigen 2.0.8 released!

For details, see the ChangeLog. The next major version is also under heavy development.

Overview

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.

FAQ

Frequently asked questions are here.

Documentation

The documentation is here. This is for the stable version.

It includes a Tutorial.

Here is the documentation of the unstable development branch.

To learn about the internals of Eigen, read this example and check out this page about some of Eigen's internal mechanisms: EigenInternals.

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.

Download

The latest stable release is Eigen 2.0.8. Get it here: tar.bz2, tar.gz, zip.

More generally, if you want release x.y.z in, say, tar.bz2 format, just use the URL

 http://bitbucket.org/eigen/eigen2/get/x.y.z.tar.bz2

These archives are automatically generated and so all combinations are possible -- also for beta and RC releases. See this page for some possibilities.

Here is the unstable source archive of the development branch: tar.bz2, tar.gz, zip.

Here is the source archive of the 2.0 branch: tar.bz2, tar.gz, zip.

You can also browse the source code.

The SCM tool used for Eigen development is Mercurial also known as "Hg".

To check out the Eigen2 repository, do:

hg clone https://bitbucket.org/eigen/eigen2/

After you have run this command, you have a eigen2/ directory defaulting to the development branch (heading toward the next major version).

If instead you want the 2.0 branch, enter the eigen2/ directory and do:

hg up 2.0

If instead you want the 2.0.8 tag, enter the eigen2/ directory and do:

hg up 2.0.8

For more information about using Mercurial with Eigen, see this page.

License

Eigen is Free Software. It is licensed under the LGPL3+. As an alternative license choice, Eigen is also licensed under the GPL2+.

Virtually any software may use Eigen. Even closed-source software may use Eigen without having to disclose its own source code.

See the Licensing FAQ.

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 3.3 and newer. Very good performance with GCC 4.2 and newer.
  • MSVC (Visual Studio), 2005 and newer. Vectorization is enabled with 2008 and newer, which also gives good performance.
  • ICC, recent versions. Very good performance.
  • MinGW, recent versions. Performance is poor because MinGW uses GCC 3. This problem will go away whenever MinGW upgrades to GCC 4. If this is an important issue for you, you can try the unofficial drop-in replacements for gcc4 in mingw. In gentoo, the mingw32 cross-compiler targeting windows is using the latest gcc (currently 4.4)
  • The Sun compiler

Here are some comments about GCC compiler flags.

  • At least some optimization is mandatory to get even remotely decent speed. -O1 gives something decent for a debug mode, at 30-60% of the optimal speed. -O2 generally gives optimal speed. -O3 does not have much advantages over -O2, in our experience.
  • Debugging info with -g (equivalently -g2) can increase dramatically the executable file's size. This is always the case, but even more so with Eigen.
  • Disabling asserts, by defining -DNDEBUG or -DEIGEN_NO_DEBUG, improves performance in some cases.
  • Vectorization is automatically enabled if a SIMD instruction set is enabled by the compiler. On the x86 platform, SSE2 is not enabled by default and you need to pass the -msse2 option.

Projects using Eigen

Science

Robotics and engineering

Computer Graphics

  • VcgLib, an opensource C++ template library for the manipulation and processing of triangle and tetrahedral meshes. (switched from home made math classes)
  • MeshLab, an opensource software for the processing and editing of unstructured 3D triangular meshes and point cloud. (switched from vcglib's math classes)
  • Expe, an experimental framework for the rapid prototyping of graphics applications. No release yet, but it uses 90% of Eigen's features. (switched from home made math classes).
  • libmv, an opensource structure from motion library. (switched from FLENS)

KDE (our origins!)

  • Various KDE related projects such as Step, the Mandelbrot wallpaper plugin, some screensavers, kgllib, kglengine2d, solidkreator, etc.
  • Koffice2 (KDE's office suite), in particular Krita, the painting and image editing module. Eigen is also used a bit by KSpread, the spreadsheet module, for matrix functions such as MINVERSE, MMULT, MDETERM.
  • Kalzium uses Eigen indirectly through the aforementioned Avogadro library.

If you are aware of some interesting projects using Eigen, please send us a message or directly edit this wiki page !

Get support

Need help using Eigen? Try this:

  • The users forum is your best resource.
  • Our IRC channel is #eigen on irc.freenode.net.
  • Want to discuss something with the developers? Use our mailing list.

Bug reports

For bug reports and feature requests, please use the issue tracker.

Mailing list

Our mailing list is the central point for discussion of Eigen development.

  • To subscribe, send a mail with subject "subscribe" to eigen-request at lists tuxfamily org.
  • To unsubscribe, send a mail with subject "unsubscribe" to eigen-request at lists tuxfamily org.

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!

Once you are subscribed, you may post to eigen at lists tuxfamily org.

You can also browse the archive

You can also contact us by IRC : #eigen on irc.freenode.net.

Credits

Here are the people who make Eigen!

Note to contributors: read this page and edit your personal information. You can freely describe your contributions and link to your home page!

Notice that people who have contributed anonymous patches, are not appropriately credited in the "lines changed" statistics below. For example, among others, Rohit, Ricard and Konstantinos made important contributions as anonymous patches. Now that we are using Mercurial, one should always generate patches with identification information: see here.

Also note that certain important contributions inherently do not translate into lines of code, hence are not recorded in the "lines changed" statistics below. Examples include Thomas' hard work allowing us to migrate to Mercurial, and David's artwork for this website.

This is sorted by alphabetical order. The numbers represent cumulative changes, that's why the total is higher than the number of LOC in Eigen. These numbers account for all the development since the real beginning from scratch of Eigen 2, corresponding to revision 37.

ERROR in include.php: URL http://eigen.tuxfamily.org/credits.out not in allowed list.

Special thanks to Tuxfamily for the wonderful quality of their services!