diff options
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Real.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Real.hs | 10 |
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 | ||
144 | instance Fractional (Dim n (Vector Double)) | ||
145 | where | ||
146 | fromRational x = Dim (fromRational x) | ||
147 | (/) = lift2F (/) | ||
148 | |||
149 | instance Fractional (Dim m (Dim n (Matrix Double))) | ||
150 | where | ||
151 | fromRational x = Dim (Dim (fromRational x)) | ||
152 | (/) = (lift2F.lift2F) (/) | ||
153 | |||
144 | -------------------------------------------------------------------------------- | 154 | -------------------------------------------------------------------------------- |
145 | 155 | ||
146 | class Konst t | 156 | class Konst t |