]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/math/matrices/elimination/elimination.factor
Fixing everything for mandatory stack effects
[factor.git] / extra / math / matrices / elimination / elimination.factor
index 7638550129d2404c613299fc4940201e5d3127b3..a902eda6f78c99587e4cb1e5f74f5bd373a7aef7 100755 (executable)
@@ -69,7 +69,8 @@ SYMBOL: matrix
 : echelon ( matrix -- matrix' )
     [ 0 0 (echelon) ] with-matrix ;
 
-: nonzero-rows [ [ zero? ] all? not ] filter ;
+: nonzero-rows ( matrix -- matrix' )
+    [ [ zero? ] all? not ] filter ;
 
 : null/rank ( matrix -- null rank )
     echelon dup length swap nonzero-rows length [ - ] keep ;