diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-05-24 13:20:44 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-05-24 13:20:44 +0200 |
commit | 250cbbff42667efeafcf704594c88a626754c1ac (patch) | |
tree | 5f43d85c9edf31aa6cf266b7ef0b6db254554115 /packages/base/src/Data/Packed/Internal/Numeric.hs | |
parent | 8ede2ed162f3d00172ee3fa4835e3ee2184bcd99 (diff) |
step and cond CInt
Diffstat (limited to 'packages/base/src/Data/Packed/Internal/Numeric.hs')
-rw-r--r-- | packages/base/src/Data/Packed/Internal/Numeric.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/base/src/Data/Packed/Internal/Numeric.hs b/packages/base/src/Data/Packed/Internal/Numeric.hs index 353877a..e6fcd31 100644 --- a/packages/base/src/Data/Packed/Internal/Numeric.hs +++ b/packages/base/src/Data/Packed/Internal/Numeric.hs | |||
@@ -49,10 +49,8 @@ import Numeric.Conversion | |||
49 | import Data.Packed.Development | 49 | import Data.Packed.Development |
50 | import Numeric.Vectorized | 50 | import Numeric.Vectorized |
51 | import Data.Complex | 51 | import Data.Complex |
52 | |||
53 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ,multiplyI) | 52 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ,multiplyI) |
54 | import Data.Packed.Internal | 53 | import Data.Packed.Internal |
55 | import Foreign.C.Types(CInt) | ||
56 | import Text.Printf(printf) | 54 | import Text.Printf(printf) |
57 | 55 | ||
58 | ------------------------------------------------------------------- | 56 | ------------------------------------------------------------------- |
@@ -153,8 +151,8 @@ class Element e => Container c e | |||
153 | maxElement' :: c e -> e | 151 | maxElement' :: c e -> e |
154 | sumElements' :: c e -> e | 152 | sumElements' :: c e -> e |
155 | prodElements' :: c e -> e | 153 | prodElements' :: c e -> e |
156 | step' :: RealElement e => c e -> c e | 154 | step' :: Ord e => c e -> c e |
157 | cond' :: RealElement e | 155 | cond' :: Ord e |
158 | => c e -- ^ a | 156 | => c e -- ^ a |
159 | -> c e -- ^ b | 157 | -> c e -- ^ b |
160 | -> c e -- ^ l | 158 | -> c e -- ^ l |
@@ -205,11 +203,11 @@ instance Container Vector CInt | |||
205 | -- maxElement' = emptyErrorV "maxElement" (toScalarF Max) | 203 | -- maxElement' = emptyErrorV "maxElement" (toScalarF Max) |
206 | -- sumElements' = sumF | 204 | -- sumElements' = sumF |
207 | -- prodElements' = prodF | 205 | -- prodElements' = prodF |
208 | -- step' = stepF | 206 | step' = stepI |
209 | find' = findV | 207 | find' = findV |
210 | assoc' = assocV | 208 | assoc' = assocV |
211 | accum' = accumV | 209 | accum' = accumV |
212 | -- cond' = condV condI | 210 | cond' = condV condI |
213 | scaleRecip = undefined -- cannot match | 211 | scaleRecip = undefined -- cannot match |
214 | divide = undefined | 212 | divide = undefined |
215 | arctan2' = undefined | 213 | arctan2' = undefined |
@@ -443,7 +441,7 @@ prodElements = prodElements' | |||
443 | -- 5 |> [0.0,0.0,0.0,1.0,1.0] | 441 | -- 5 |> [0.0,0.0,0.0,1.0,1.0] |
444 | -- | 442 | -- |
445 | step | 443 | step |
446 | :: (RealElement e, Container c e) | 444 | :: (Ord e, Container c e) |
447 | => c e | 445 | => c e |
448 | -> c e | 446 | -> c e |
449 | step = step' | 447 | step = step' |
@@ -460,7 +458,7 @@ step = step' | |||
460 | -- , 0.0, 0.0, 100.0, 12.0 ] | 458 | -- , 0.0, 0.0, 100.0, 12.0 ] |
461 | -- | 459 | -- |
462 | cond | 460 | cond |
463 | :: (RealElement e, Container c e) | 461 | :: (Ord e, Container c e) |
464 | => c e -- ^ a | 462 | => c e -- ^ a |
465 | -> c e -- ^ b | 463 | -> c e -- ^ b |
466 | -> c e -- ^ l | 464 | -> c e -- ^ l |