3/19/2013

C++ linear algebra library -> armadillo

armadillo  -> http://arma.sourceforge.net/






Armadillo expression comparing matlab

~~~~~~~~~~~~~~~~~~~~~
*M :
>> A=[5:9]
A =
     5     6     7     8     9

*A :
 linspace(5, 9, 9-5+1)
5.0 6.0 7.0 8.0 9.0

 linspace(5, 9, 9-5+1)
5 6 7 8 9
~~~~~~~~~~~~~~~~~~~~~
*M
A=[1 2 3; 4 5 6];
>> sum(a,1)

ans =

     5     7     9

>> sum(a,2)

ans =

     6
    15

*A
sum(a, 0)
5 7 9
sum(a,1)
6
15









1 comment:

  1. Anonymous11/4/14 00:52

    Armadillo now included as part of Ceemple, a rapid JIT based C++ technical coputing environment. Available (free) from http://www.ceemple.com.

    ReplyDelete