diff options
Diffstat (limited to 'packages/base/src/Data/Packed/Internal/Numeric.hs')
-rw-r--r-- | packages/base/src/Data/Packed/Internal/Numeric.hs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/base/src/Data/Packed/Internal/Numeric.hs b/packages/base/src/Data/Packed/Internal/Numeric.hs index e6fcd31..6c30a72 100644 --- a/packages/base/src/Data/Packed/Internal/Numeric.hs +++ b/packages/base/src/Data/Packed/Internal/Numeric.hs | |||
@@ -186,23 +186,23 @@ instance Container Vector CInt | |||
186 | where | 186 | where |
187 | conj' = id | 187 | conj' = id |
188 | size' = dim | 188 | size' = dim |
189 | -- scale' = vectorMapValF Scale | 189 | scale' = vectorMapValI Scale |
190 | -- addConstant = vectorMapValF AddConstant | 190 | addConstant = vectorMapValI AddConstant |
191 | -- add = vectorZipF Add | 191 | add = vectorZipI Add |
192 | -- sub = vectorZipF Sub | 192 | sub = vectorZipI Sub |
193 | -- mul = vectorZipF Mul | 193 | mul = vectorZipI Mul |
194 | -- equal u v = dim u == dim v && maxElement (vectorMapF Abs (sub u v)) == 0.0 | 194 | equal u v = dim u == dim v && maxElement' (vectorMapI Abs (sub u v)) == 0 |
195 | scalar' x = fromList [x] | 195 | scalar' x = fromList [x] |
196 | konst' = constantD | 196 | konst' = constantD |
197 | build' = buildV | 197 | build' = buildV |
198 | cmap' = mapVector | 198 | cmap' = mapVector |
199 | atIndex' = (@>) | 199 | atIndex' = (@>) |
200 | -- minIndex' = emptyErrorV "minIndex" (round . toScalarF MinIdx) | 200 | minIndex' = emptyErrorV "minIndex" (fromIntegral . toScalarI MinIdx) |
201 | -- maxIndex' = emptyErrorV "maxIndex" (round . toScalarF MaxIdx) | 201 | maxIndex' = emptyErrorV "maxIndex" (fromIntegral . toScalarI MaxIdx) |
202 | -- minElement' = emptyErrorV "minElement" (toScalarF Min) | 202 | minElement' = emptyErrorV "minElement" (toScalarI Min) |
203 | -- maxElement' = emptyErrorV "maxElement" (toScalarF Max) | 203 | maxElement' = emptyErrorV "maxElement" (toScalarI Max) |
204 | -- sumElements' = sumF | 204 | sumElements' = sumI |
205 | -- prodElements' = prodF | 205 | prodElements' = prodI |
206 | step' = stepI | 206 | step' = stepI |
207 | find' = findV | 207 | find' = findV |
208 | assoc' = assocV | 208 | assoc' = assocV |
@@ -569,9 +569,9 @@ instance Product (Complex Double) where | |||
569 | 569 | ||
570 | instance Product CInt where | 570 | instance Product CInt where |
571 | norm2 = undefined | 571 | norm2 = undefined |
572 | -- absSum = emptyVal (toScalarF AbsSum) | 572 | absSum = emptyVal (sumElements . vectorMapI Abs) |
573 | -- norm1 = emptyVal (toScalarF AbsSum) | 573 | norm1 = absSum |
574 | -- normInf = emptyVal (maxElement . vectorMapF Abs) | 574 | normInf = emptyVal (maxElement . vectorMapI Abs) |
575 | multiply = emptyMul multiplyI | 575 | multiply = emptyMul multiplyI |
576 | 576 | ||
577 | 577 | ||