From: Michael Orlitzky Date: Fri, 7 Dec 2018 15:08:54 +0000 (-0500) Subject: src/Linear/Matrix.hs: define "one" in the ring of matrices. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=cc6e96512831fd319a185b1f5ef513a19b69c853;p=numerical-analysis.git src/Linear/Matrix.hs: define "one" in the ring of matrices. --- diff --git a/src/Linear/Matrix.hs b/src/Linear/Matrix.hs index e8d7180..2d73472 100644 --- a/src/Linear/Matrix.hs +++ b/src/Linear/Matrix.hs @@ -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. + one = identity_matrix m1 * m2 = m1 * m2