Copyright | (c) Alexey Kuleshevich 2019-2022 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
class (Size r, Num e) => FoldNumeric r e where Source #
sumArray :: Index ix => Array r ix e -> e Source #
Compute sum of all elements in the array
Since: 0.5.6
productArray :: Index ix => Array r ix e -> e Source #
Compute product of all elements in the array
Since: 0.5.6
powerSumArray :: Index ix => Array r ix e -> Int -> e Source #
Raise each element in the array to some non-negative power and sum the results
Since: 0.5.7
unsafeDotProduct :: Index ix => Array r ix e -> Array r ix e -> e Source #
Compute dot product without any extraneous checks
Since: 0.5.6
foldArray :: Index ix => (e -> e -> e) -> e -> Array r ix e -> e Source #
Fold over an array
Since: 0.5.6
Instances
defaultUnsafeDotProduct :: (Num e, Index ix, Source r e) => Array r ix e -> Array r ix e -> e Source #
class FoldNumeric r e => Numeric r e where Source #
plusScalar :: Index ix => Array r ix e -> e -> Array r ix e Source #
minusScalar :: Index ix => Array r ix e -> e -> Array r ix e Source #
scalarMinus :: Index ix => e -> Array r ix e -> Array r ix e Source #
multiplyScalar :: Index ix => Array r ix e -> e -> Array r ix e Source #
absPointwise :: Index ix => Array r ix e -> Array r ix e Source #
additionPointwise :: Index ix => Array r ix e -> Array r ix e -> Array r ix e Source #
subtractionPointwise :: Index ix => Array r ix e -> Array r ix e -> Array r ix e Source #
multiplicationPointwise :: Index ix => Array r ix e -> Array r ix e -> Array r ix e Source #
powerPointwise :: Index ix => Array r ix e -> Int -> Array r ix e Source #
Raise each element of the array to the power
unsafeLiftArray :: Index ix => (e -> e) -> Array r ix e -> Array r ix e Source #
unsafeLiftArray2 :: Index ix => (e -> e -> e) -> Array r ix e -> Array r ix e -> Array r ix e Source #
Instances
defaultUnsafeLiftArray :: (Load r ix e, Source r e) => (e -> e) -> Array r ix e -> Array r ix e Source #
defaultUnsafeLiftArray2 :: (Load r ix e, Source r e) => (e -> e -> e) -> Array r ix e -> Array r ix e -> Array r ix e Source #
class (Numeric r e, Floating e) => NumericFloat r e where Source #
Nothing
divideScalar :: Index ix => Array r ix e -> e -> Array r ix e Source #
scalarDivide :: Index ix => e -> Array r ix e -> Array r ix e Source #
divisionPointwise :: Index ix => Array r ix e -> Array r ix e -> Array r ix e Source #
recipPointwise :: Index ix => Array r ix e -> Array r ix e Source #
sqrtPointwise :: Index ix => Array r ix e -> Array r ix e Source #