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++?
Eigen is a very fast matrix manipulation and linear algebra library which uses hardware acceleration when available.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With