]> gitweb.michael.orlitzky.com - numerical-analysis.git/commitdiff
src/Linear/Matrix.hs: define "one" in the ring of matrices.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 7 Dec 2018 15:08:54 +0000 (10:08 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 7 Dec 2018 15:08:54 +0000 (10:08 -0500)
src/Linear/Matrix.hs

index e8d7180fbc7717ef93ce3eb30ff55332aeef31b5..2d7347230b71281a8ec4562b67e160958e1baf7e 100644 (file)
@@ -604,6 +604,7 @@ instance (Ring.C a, Arity m, Arity n) => Additive.C (Mat m n a) where
 instance (Ring.C a, Arity m, Arity n, m ~ n) => Ring.C (Mat (S m) (S n) a) where
   -- The first * is ring multiplication, the second is matrix
   -- multiplication.
 instance (Ring.C a, Arity m, Arity n, m ~ n) => Ring.C (Mat (S m) (S n) a) where
   -- The first * is ring multiplication, the second is matrix
   -- multiplication.
+  one = identity_matrix
   m1 * m2 = m1 * m2
 
 
   m1 * m2 = m1 * m2