]> gitweb.factorcode.org Git - factor.git/commitdiff
math.blas.matrices: Fix for equal?
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 19 Jan 2019 16:06:35 +0000 (10:06 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 19 Jan 2019 16:08:07 +0000 (10:08 -0600)
extra/math/blas/matrices/matrices-tests.factor
extra/math/blas/matrices/matrices.factor

index edb331d64124642a8b6b6137de311763b8468b73..e97a9a6252de07de5bccc5fac9762fe174e79cbe 100644 (file)
@@ -706,3 +706,12 @@ sequences tools.test ;
         { 2.0 3.0 0.0          1.0 0.0 }
     } Mtranspose 2 1 3 2 Msub
 ] unit-test
+
+! Bugfix: blas-matrix-base did not handle `f smatrix{ } equal?`
+{ f } [
+    f smatrix{
+        svector{ 1.0 2.0 3.0 4.0 }
+        svector{ 2.0 2.0 3.0 4.0 }
+        svector{ 3.0 2.0 3.0 4.0 }
+    } equal?
+] unit-test
\ No newline at end of file
index 85df45a0939053ad993f0148687d73d1752e62d7..250d127d09b78d2851d7cdbd396faeacc7b1847b 100644 (file)
@@ -241,6 +241,7 @@ M: blas-matrix-rowcol-sequence nth-unsafe
 
 M: blas-matrix-base equal?
     {
+        [ and ]
         [ [ Mwidth ] bi@ = ]
         [ [ Mcols ] bi@ [ = ] 2all? ]
     } 2&& ;