Copyright | (c) Alexey Kuleshevich 2018-2019 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- (.+.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)
- (.+) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e
- (+.) :: (Index ix, Numeric r e) => e -> Array r ix e -> Array r ix e
- (.-.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)
- (.-) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e
- (-.) :: (Index ix, Numeric r e) => e -> Array r ix e -> Array r ix e
- (.*.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)
- (.*) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e
- (*.) :: (Index ix, Numeric r e) => e -> Array r ix e -> Array r ix e
- (.^) :: (Index ix, Numeric r e) => Array r ix e -> Int -> Array r ix e
- (|*|) :: (Mutable r Ix2 e, Source r' Ix2 e, OuterSlice r Ix2 e, Source (R r) Ix1 e, Num e, MonadThrow m) => Array r Ix2 e -> Array r' Ix2 e -> m (Array r Ix2 e)
- multiplyTransposed :: (Manifest r Ix2 e, OuterSlice r Ix2 e, Source (R r) Ix1 e, Num e, MonadThrow m) => Array r Ix2 e -> Array r Ix2 e -> m (Array D Ix2 e)
- identityMatrix :: Sz1 -> Array DL Ix2 Int
- negateA :: (Index ix, Numeric r e) => Array r ix e -> Array r ix e
- absA :: (Index ix, Numeric r e) => Array r ix e -> Array r ix e
- signumA :: (Index ix, Numeric r e) => Array r ix e -> Array r ix e
- fromIntegerA :: (Index ix, Num e) => Integer -> Array D ix e
- quotA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- remA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- divA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- modA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- quotRemA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> (Array D ix e, Array D ix e)
- divModA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> (Array D ix e, Array D ix e)
- (./.) :: (Load r ix e, NumericFloat r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)
- (./) :: (Index ix, NumericFloat r e) => Array r ix e -> e -> Array r ix e
- (.^^) :: (Index ix, Numeric r e, Fractional e, Integral b) => Array r ix e -> b -> Array r ix e
- recipA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- fromRationalA :: (Index ix, Fractional e) => Rational -> Array D ix e
- piA :: (Index ix, Floating e) => Array D ix e
- expA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- logA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- sqrtA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- (.**) :: (Source r1 ix e, Source r2 ix e, Floating e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- logBaseA :: (Source r1 ix e, Source r2 ix e, Floating e) => Array r1 ix e -> Array r2 ix e -> Array D ix e
- sinA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- cosA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- tanA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- asinA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- acosA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- atanA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- sinhA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- coshA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- tanhA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- asinhA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- acoshA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- atanhA :: (Index ix, NumericFloat r e) => Array r ix e -> Array r ix e
- truncateA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e
- roundA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e
- ceilingA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e
- floorA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e
- atan2A :: (Load r ix e, Numeric r e, RealFloat e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)
Num
(.+.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e) infixl 6 Source #
Add two arrays together pointwise. Throws SizeMismatchException
if arrays sizes do
not match.
Since: 0.4.0
(.+) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e infixl 6 Source #
Add a scalar to each element of the array. Array is on the left.
Since: 0.1.0
(+.) :: (Index ix, Numeric r e) => e -> Array r ix e -> Array r ix e infixl 6 Source #
Add a scalar to each element of the array. Array is on the right.
Since: 0.4.0
(.-.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e) infixl 6 Source #
Subtract two arrays pointwise. Throws SizeMismatchException
if arrays sizes do not
match.
Since: 0.4.0
(.-) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix e infixl 6 Source #
Subtract a scalar from each element of the array. Array is on the left.
Since: 0.1.0
(-.) :: (Index ix, Numeric r e) => e -> Array r ix e -> Array r ix e infixl 6 Source #
Subtract a scalar from each element of the array. Array is on the right.
Since: 0.4.0
(.*.) :: (Load r ix e, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e) infixl 7 Source #
Multiply two arrays together pointwise.
Since: 0.4.0
(|*|) :: (Mutable r Ix2 e, Source r' Ix2 e, OuterSlice r Ix2 e, Source (R r) Ix1 e, Num e, MonadThrow m) => Array r Ix2 e -> Array r' Ix2 e -> m (Array r Ix2 e) Source #
Perform matrix multiplication. Inner dimensions must agree, otherwise SizeMismatchException
.
multiplyTransposed :: (Manifest r Ix2 e, OuterSlice r Ix2 e, Source (R r) Ix1 e, Num e, MonadThrow m) => Array r Ix2 e -> Array r Ix2 e -> m (Array D Ix2 e) Source #
It is quite often that second matrix gets transposed before multiplication (eg. A * A'), but due to layout of data in memory it is more efficient to transpose the second array again.
identityMatrix :: Sz1 -> Array DL Ix2 Int Source #
Create an indentity matrix.
Example
>>>
import Data.Massiv.Array
>>>
identityMatrix 5
Array DL Seq (Sz (5 :. 5)) [ [ 1, 0, 0, 0, 0 ] , [ 0, 1, 0, 0, 0 ] , [ 0, 0, 1, 0, 0 ] , [ 0, 0, 0, 1, 0 ] , [ 0, 0, 0, 0, 1 ] ]
Since: 0.3.6
Integral
quotA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e infixl 7 Source #
remA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e infixl 7 Source #
divA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e infixl 7 Source #
modA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> Array D ix e infixl 7 Source #
quotRemA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> (Array D ix e, Array D ix e) Source #
divModA :: (Source r1 ix e, Source r2 ix e, Integral e) => Array r1 ix e -> Array r2 ix e -> (Array D ix e, Array D ix e) Source #
Fractional
(./.) :: (Load r ix e, NumericFloat r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e) infixl 7 Source #
(.^^) :: (Index ix, Numeric r e, Fractional e, Integral b) => Array r ix e -> b -> Array r ix e infixr 8 Source #
fromRationalA :: (Index ix, Fractional e) => Rational -> Array D ix e Source #
Floating
(.**) :: (Source r1 ix e, Source r2 ix e, Floating e) => Array r1 ix e -> Array r2 ix e -> Array D ix e Source #
logBaseA :: (Source r1 ix e, Source r2 ix e, Floating e) => Array r1 ix e -> Array r2 ix e -> Array D ix e Source #
RealFrac
truncateA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e Source #
ceilingA :: (Index ix, Numeric r e, RealFrac a, Integral e) => Array r ix a -> Array r ix e Source #