summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Real.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Real.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Real.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Real.hs b/packages/base/src/Numeric/LinearAlgebra/Real.hs
index db15705..1e8b544 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Real.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Real.hs
@@ -141,6 +141,16 @@ instance (Num (Matrix t), Numeric t) => Num (Dim m (Dim n (Matrix t)))
141 negate = (lift1F . lift1F) negate 141 negate = (lift1F . lift1F) negate
142 fromInteger x = Dim (Dim (fromInteger x)) 142 fromInteger x = Dim (Dim (fromInteger x))
143 143
144instance Fractional (Dim n (Vector Double))
145 where
146 fromRational x = Dim (fromRational x)
147 (/) = lift2F (/)
148
149instance Fractional (Dim m (Dim n (Matrix Double)))
150 where
151 fromRational x = Dim (Dim (fromRational x))
152 (/) = (lift2F.lift2F) (/)
153
144-------------------------------------------------------------------------------- 154--------------------------------------------------------------------------------
145 155
146class Konst t 156class Konst t