comparison liboctave/dMatrix.cc @ 9528:ec066ba012c8

more fixes & tests for matrix multiply
author Jaroslav Hajek <highegg@gmail.com>
date Sun, 16 Aug 2009 08:25:24 +0200
parents 0ce82753dd72
children 3d6a9aea2aea
comparison
equal deleted inserted replaced
9527:6a9fd5f653c9 9528:ec066ba012c8
3157 %!shared M, cv, rv 3157 %!shared M, cv, rv
3158 %! M = randn(10,10); 3158 %! M = randn(10,10);
3159 %! cv = randn(10,1); 3159 %! cv = randn(10,1);
3160 %! rv = randn(1,10); 3160 %! rv = randn(1,10);
3161 %!assert([M*cv,M*cv],M*[cv,cv],1e-14) 3161 %!assert([M*cv,M*cv],M*[cv,cv],1e-14)
3162 %!assert([M'*cv,M'*cv],M'*[cv,cv],1e-14)
3162 %!assert([rv*M;rv*M],[rv;rv]*M,1e-14) 3163 %!assert([rv*M;rv*M],[rv;rv]*M,1e-14)
3164 %!assert([rv*M';rv*M'],[rv;rv]*M',1e-14)
3163 %!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-14) 3165 %!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-14)
3164 */ 3166 */
3165 3167
3166 static const char * 3168 static const char *
3167 get_blas_trans_arg (bool trans) 3169 get_blas_trans_arg (bool trans)