diff options
Diffstat (limited to 'lib/Numeric/Container.hs')
-rw-r--r-- | lib/Numeric/Container.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Numeric/Container.hs b/lib/Numeric/Container.hs index 77c9902..44e2711 100644 --- a/lib/Numeric/Container.hs +++ b/lib/Numeric/Container.hs | |||
@@ -8,7 +8,7 @@ | |||
8 | ----------------------------------------------------------------------------- | 8 | ----------------------------------------------------------------------------- |
9 | -- | | 9 | -- | |
10 | -- Module : Numeric.Container | 10 | -- Module : Numeric.Container |
11 | -- Copyright : (c) Alberto Ruiz 2007 | 11 | -- Copyright : (c) Alberto Ruiz 2010 |
12 | -- License : GPL-style | 12 | -- License : GPL-style |
13 | -- | 13 | -- |
14 | -- Maintainer : Alberto Ruiz <aruiz@um.es> | 14 | -- Maintainer : Alberto Ruiz <aruiz@um.es> |
@@ -41,7 +41,6 @@ import Numeric.GSL.Vector | |||
41 | 41 | ||
42 | import Data.Complex | 42 | import Data.Complex |
43 | import Control.Monad(ap) | 43 | import Control.Monad(ap) |
44 | --import Control.Arrow((***)) | ||
45 | 44 | ||
46 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) | 45 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) |
47 | 46 | ||
@@ -78,15 +77,18 @@ class (Element e) => Container c e where | |||
78 | -- | 77 | -- |
79 | -- | indexing function | 78 | -- | indexing function |
80 | atIndex :: c e -> IndexOf c -> e | 79 | atIndex :: c e -> IndexOf c -> e |
81 | -- | index of min/max element | 80 | -- | index of min element |
82 | minIndex :: c e -> IndexOf c | 81 | minIndex :: c e -> IndexOf c |
82 | -- | index of max element | ||
83 | maxIndex :: c e -> IndexOf c | 83 | maxIndex :: c e -> IndexOf c |
84 | -- | value of min/max element | 84 | -- | value of min element |
85 | minElement :: c e -> e | 85 | minElement :: c e -> e |
86 | -- | value of max element | ||
86 | maxElement :: c e -> e | 87 | maxElement :: c e -> e |
87 | -- the C functions sumX/prodX are twice as fast as using foldVector | 88 | -- the C functions sumX/prodX are twice as fast as using foldVector |
88 | -- | the sum/product of elements (faster than using @fold@ | 89 | -- | the sum of elements (faster than using @fold@) |
89 | sumElements :: c e -> e | 90 | sumElements :: c e -> e |
91 | -- | the product of elements (faster than using @fold@) | ||
90 | prodElements :: c e -> e | 92 | prodElements :: c e -> e |
91 | 93 | ||
92 | -- -- | Basic element-by-element functions. | 94 | -- -- | Basic element-by-element functions. |
@@ -215,7 +217,7 @@ class Element e => Product e where | |||
215 | multiply :: Matrix e -> Matrix e -> Matrix e | 217 | multiply :: Matrix e -> Matrix e -> Matrix e |
216 | -- | dot (inner) product | 218 | -- | dot (inner) product |
217 | dot :: Vector e -> Vector e -> e | 219 | dot :: Vector e -> Vector e -> e |
218 | -- | sum of absolute value of elements (differs in complex case from @norm1@ | 220 | -- | sum of absolute value of elements (differs in complex case from @norm1@) |
219 | absSum :: Vector e -> RealOf e | 221 | absSum :: Vector e -> RealOf e |
220 | -- | sum of absolute value of elements | 222 | -- | sum of absolute value of elements |
221 | norm1 :: Vector e -> RealOf e | 223 | norm1 :: Vector e -> RealOf e |