]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/math/matrices/extras/extras.factor
factor: trim using lists
[factor.git] / extra / math / matrices / extras / extras.factor
index cdbef2416c17aeba419fc60f23b11baab4c11f37..f142f489b2812ccce1525c01ad8167caca13bf27 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2005, 2010, 2018 Slava Pestov, Joe Groff, and Cat Stevens.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays combinators formatting fry kernel locals
-math math.bits math.functions math.matrices
-math.matrices.private math.order math.statistics math.text.english
-math.vectors random sequences sequences.deep summary ;
+USING: accessors arrays combinators formatting kernel math
+math.bits math.functions math.matrices math.order
+math.statistics math.text.english math.vectors random sequences
+sequences.deep summary ;
 IN: math.matrices.extras
 
 ! this is a questionable implementation
@@ -306,7 +306,7 @@ M: matrix recip
 ! TODO: use the faster algorithm: [ determinant zero? ]
 : invertible-matrix? ( matrix -- ? )
     [ dimension first2 max <identity-matrix> ] keep
-    dup recip m. = ;
+    dup recip mdot = ;
 
 : linearly-independent-matrix? ( matrix -- ? ) ;
 
@@ -314,7 +314,7 @@ M: matrix recip
 ! this is the original definition of m^n as committed in 2012; it has not been lost
 : (m^n) ( m n -- n )
     make-bits over first length <identity-matrix>
-    [ [ dupd m. ] when [ dup m. ] dip ] reduce nip ;
+    [ [ dupd mdot ] when [ dup mdot ] dip ] reduce nip ;
 PRIVATE>
 
 ! A^-1 is the inverse but other negative powers are nonsense