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
- (#>) :: (MonadThrow m, Num e, Source (R r) Ix1 e, Manifest r' Ix1 e, OuterSlice r Ix2 e) => Array r Ix2 e -> Array r' Ix1 e -> m (Array D Ix1 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 :: Num e => Sz1 -> Matrix DL e
- lowerTriangular :: Num e => Comp -> Sz1 -> (Ix2 -> e) -> Matrix DL e
- upperTriangular :: Num e => Comp -> Sz1 -> (Ix2 -> e) -> Matrix DL e
- 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 #
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 #
Computes the matrix-matrix transposed product (i.e. A * A')
identityMatrix :: Num e => Sz1 -> Matrix DL e 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
lowerTriangular :: Num e => Comp -> Sz1 -> (Ix2 -> e) -> Matrix DL e Source #
Create a lower triangular (L in LU decomposition) matrix of size NxN
Example
>>>
import Data.Massiv.Array
>>>
lowerTriangular Seq 5 (\(i :. j) -> i + j)
Array DL Seq (Sz (5 :. 5)) [ [ 0, 0, 0, 0, 0 ] , [ 1, 2, 0, 0, 0 ] , [ 2, 3, 4, 0, 0 ] , [ 3, 4, 5, 6, 0 ] , [ 4, 5, 6, 7, 8 ] ]
Since: 0.5.2
upperTriangular :: Num e => Comp -> Sz1 -> (Ix2 -> e) -> Matrix DL e Source #
Create an upper triangular (U in LU decomposition) matrix of size NxN
Example
>>>
import Data.Massiv.Array
>>>
upperTriangular Par 5 (\(i :. j) -> i + j)
Array DL Par (Sz (5 :. 5)) [ [ 0, 1, 2, 3, 4 ] , [ 0, 2, 3, 4, 5 ] , [ 0, 0, 4, 5, 6 ] , [ 0, 0, 0, 6, 7 ] , [ 0, 0, 0, 0, 8 ] ]
Since: 0.5.2
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 #