diff options
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Linear.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Linear.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Numeric/LinearAlgebra/Linear.hs b/lib/Numeric/LinearAlgebra/Linear.hs index 9a7e65f..51e93fb 100644 --- a/lib/Numeric/LinearAlgebra/Linear.hs +++ b/lib/Numeric/LinearAlgebra/Linear.hs | |||
@@ -17,7 +17,7 @@ Basic optimized operations on vectors and matrices. | |||
17 | 17 | ||
18 | module Numeric.LinearAlgebra.Linear ( | 18 | module Numeric.LinearAlgebra.Linear ( |
19 | -- * Linear Algebra Typeclasses | 19 | -- * Linear Algebra Typeclasses |
20 | Vectors(..), | 20 | Vectors(..), |
21 | Linear(..), | 21 | Linear(..), |
22 | -- * Creation of numeric vectors | 22 | -- * Creation of numeric vectors |
23 | constant, linspace | 23 | constant, linspace |
@@ -86,7 +86,7 @@ instance Vectors Vector (Complex Double) where | |||
86 | ---------------------------------------------------- | 86 | ---------------------------------------------------- |
87 | 87 | ||
88 | -- | Basic element-by-element functions. | 88 | -- | Basic element-by-element functions. |
89 | class (Container c e) => Linear c e where | 89 | class (Element e, AutoReal e, Convert e, Container c) => Linear c e where |
90 | -- | create a structure with a single element | 90 | -- | create a structure with a single element |
91 | scalar :: e -> c e | 91 | scalar :: e -> c e |
92 | scale :: e -> c e -> c e | 92 | scale :: e -> c e -> c e |
@@ -148,7 +148,7 @@ instance Linear Vector (Complex Float) where | |||
148 | equal u v = dim u == dim v && vectorMax (mapVector magnitude (sub u v)) == 0.0 | 148 | equal u v = dim u == dim v && vectorMax (mapVector magnitude (sub u v)) == 0.0 |
149 | scalar x = fromList [x] | 149 | scalar x = fromList [x] |
150 | 150 | ||
151 | instance (Linear Vector a, Container Matrix a) => (Linear Matrix a) where | 151 | instance (Linear Vector a, Container Matrix) => (Linear Matrix a) where |
152 | scale x = liftMatrix (scale x) | 152 | scale x = liftMatrix (scale x) |
153 | scaleRecip x = liftMatrix (scaleRecip x) | 153 | scaleRecip x = liftMatrix (scaleRecip x) |
154 | addConstant x = liftMatrix (addConstant x) | 154 | addConstant x = liftMatrix (addConstant x) |