Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a fast free matrix/linear algebra library for the R language? [closed]

Tags:

c++

math

I've been dealing with math-intensive code and require a good matrix library. I could use a two dimensional array, but a complete matrix library (with multiplication, addition etc.) would be much more convenient. I obviously already googled it, but this gave me a plethora of choices. I was hoping that the opinions of a few experienced programmers would help narrow it down.

What are some good free matrix/linear algebra libraries for C++?

like image 470
fdh Avatar asked Dec 02 '22 22:12

fdh


2 Answers

Eigen is a very fast matrix manipulation and linear algebra library which uses hardware acceleration when available.

like image 74
andand Avatar answered Dec 15 '22 14:12

andand


You can try uBlas

Functionality

uBLAS provides templated C++ classes for dense, unit and sparse vectors, dense, identity, triangular, banded, symmetric, hermitian and sparse matrices. Views into vectors and matrices can be constructed via ranges, slices, adaptor classes and indirect arrays. The library covers the usual basic linear algebra operations on vectors and matrices: reductions like different norms, addition and subtraction of vectors and matrices and multiplication with a scalar, inner and outer products of vectors, matrix vector and matrix matrix products and triangular solver. The glue between containers, views and expression templated operations is a mostly STL conforming iterator interface.

like image 28
dirkgently Avatar answered Dec 15 '22 12:12

dirkgently