Mercurial > hg > octave-max
comparison liboctave/fMatrix.cc @ 12065:899122410ea5 release-3-2-x
more fixes & tests for matrix multiply
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sun, 23 Aug 2009 11:11:27 +0200 |
parents | 8e8da2c36e7e |
children |
comparison
equal
deleted
inserted
replaced
12064:8e8da2c36e7e | 12065:899122410ea5 |
---|---|
3155 /* Test some simple identities | 3155 /* Test some simple identities |
3156 %!shared M, cv, rv | 3156 %!shared M, cv, rv |
3157 %! M = single(randn(10,10)); | 3157 %! M = single(randn(10,10)); |
3158 %! cv = single(randn(10,1)); | 3158 %! cv = single(randn(10,1)); |
3159 %! rv = single(randn(1,10)); | 3159 %! rv = single(randn(1,10)); |
3160 %!assert([M*cv,M*cv],M*[cv,cv],5e-7) | 3160 %!assert([M*cv,M*cv],M*[cv,cv],5e-6) |
3161 %!assert([rv*M;rv*M],[rv;rv]*M,5e-7) | 3161 %!assert([M'*cv,M'*cv],M'*[cv,cv],5e-6) |
3162 %!assert(2*rv*cv,[rv,rv]*[cv;cv],5e-7) | 3162 %!assert([rv*M;rv*M],[rv;rv]*M,5e-6) |
3163 %!assert([rv*M';rv*M'],[rv;rv]*M',5e-6) | |
3164 %!assert(2*rv*cv,[rv,rv]*[cv;cv],5e-6) | |
3163 */ | 3165 */ |
3164 | 3166 |
3165 static const char * | 3167 static const char * |
3166 get_blas_trans_arg (bool trans) | 3168 get_blas_trans_arg (bool trans) |
3167 { | 3169 { |