Matrix classes in C ++

I am doing math with linear algebra and was looking for some really easy and easy to use matrix class that could handle different sizes: basically 2x2, 2x1, 3x1 and 1x2. I suggest that such a class can be implemented using templates and in some cases use some specialization for performance. Does anyone know of any simple implementation available for use? I don’t want “bloated” implementations, as I will run this in an embedded environment where memory is limited.

thanks

+3
source share
8 answers

++, Armadillo.

  • .
  • Armadillo ( ), ( ).
  • , , Armadillo "" - .
  • , - API Matlab (. ).

, Armadillo , LAPACK ( BLAS), . , , OpenBLAS ( ATLAS). FAQ Armadillo, .

Google , , Armadillo .

+5

std:: valarray .

+1

Newmat . , , ( 50 , Visual Studio 1,8 ).

+1
+1

, : http://koti.welho.com/aarpikar/lib/

, (2x2, 3x3, 3x1 ..), . , 4x4. , 4x4 . , , .:)

0

How easy is it to store a matrix in an array, for example

2x3 matrix = {2,3,val1,val2,...,val6}

It is really simple, and the addition operations are trivial. However, you need to write your own multiplication function.

-1
source

Source: https://habr.com/ru/post/1715208/


All Articles