Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for an elegant and efficient C++ matrix library [closed]

Greetings, googling for that subject brings, e.g., MTL, exmat, LAPACK and also here. I also seem to remember that Microsoft Research released one, but can't put my hands on it. I look for advice from someone who actually used (or developed...) one of those, hoping to achieve a Matlab experience inside C++ (as much as possible). Thanks in advance, Robi

like image 322
robi-y Avatar asked Jul 29 '10 05:07

robi-y


4 Answers

Have a look at Armadillo, the docs have a syntax conversion table for Matlab users and there are benchmarks against other C++ matrix libraries in the website. I find it very user friendly.

like image 121
Matti Pastell Avatar answered Oct 19 '22 08:10

Matti Pastell


I use both Eigen and Matlab and like both of them a lot. Eigen supports SIMD and lazy evaluations for extra performance. But users don't need to bother with internals. Eigen's interface is very simple and intuitive. Going from Matlab to Eigen should be relatively straightforward, which I can't say about uBLAS or LAPACK.

EDIT: Here is Eigen Quick Reference for Matlab Users

like image 21
user401947 Avatar answered Oct 19 '22 09:10

user401947


boost has a math library capable of matrix algebra - uBLAS.

like image 6
Igor Zevaka Avatar answered Oct 19 '22 09:10

Igor Zevaka


There are two new Linear Algebra Libs in the Boost ecosystem namely NT2 and Boost LA AFAIK there is work underway (even halfway done?) to make them compatible with Boost uBlas.

like image 1
Fabio Fracassi Avatar answered Oct 19 '22 07:10

Fabio Fracassi