Data.Matrix.Dense.Operations
 Stability experimental Maintainer Patrick Perry
 Contents Copy and swap Matrix multiplication Pure Impure Matrix Arithmetic Pure Impure In-place operations BLAS operations
Description
Synopsis
 copyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () swapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO () apply :: BLAS2 e => Matrix (m, n) e -> Vector n e -> Vector m e applyMat :: BLAS3 e => Matrix (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e sapply :: BLAS2 e => e -> Matrix (m, n) e -> Vector n e -> Vector m e sapplyMat :: BLAS3 e => e -> Matrix (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e getApply :: BLAS2 e => DMatrix s (m, n) e -> DVector t n e -> IO (DVector r m e) getApplyMat :: BLAS3 e => DMatrix s (m, k) e -> DMatrix t (k, n) e -> IO (DMatrix r (m, n) e) getSApply :: BLAS2 e => e -> DMatrix s (m, n) e -> DVector t n e -> IO (DVector r m e) getSApplyMat :: BLAS3 e => e -> DMatrix s (m, k) e -> DMatrix t (k, n) e -> IO (DMatrix r (m, n) e) shift :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e scale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e invScale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e add :: BLAS1 e => e -> Matrix (m, n) e -> e -> Matrix (m, n) e -> Matrix (m, n) e plus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e minus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e times :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e divide :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e getShifted :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getInvScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getSum :: BLAS1 e => e -> DMatrix s (m, n) e -> e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getDiff :: BLAS1 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getProduct :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) getRatio :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) doConj :: BLAS1 e => IOMatrix (m, n) e -> IO (IOMatrix (m, n) e) shiftBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () scaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () invScaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () axpy :: BLAS1 e => e -> DMatrix t (m, n) e -> IOMatrix (m, n) e -> IO () (+=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () (-=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () (*=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () (//=) :: BLAS2 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () gemv :: BLAS2 e => e -> DMatrix s (m, n) e -> DVector t n e -> e -> IOVector m e -> IO () gemm :: BLAS3 e => e -> DMatrix s (m, k) e -> DMatrix t (k, n) e -> e -> IOMatrix (m, n) e -> IO ()
Copy and swap
 copyMatrix :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () Source
copy dst src copies the elements from the second argument to the first.
 swapMatrices :: BLAS1 e => IOMatrix (m, n) e -> IOMatrix (m, n) e -> IO () Source
swap a b exchanges the elements stored in two matrices.
Matrix multiplication
Pure
 apply :: BLAS2 e => Matrix (m, n) e -> Vector n e -> Vector m e Source
Multiply a matrix by a vector.
 applyMat :: BLAS3 e => Matrix (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e Source
Multiply a matrix by a matrix.
 sapply :: BLAS2 e => e -> Matrix (m, n) e -> Vector n e -> Vector m e Source
Multiply a scaled matrix by a vector.
 sapplyMat :: BLAS3 e => e -> Matrix (m, k) e -> Matrix (k, n) e -> Matrix (m, n) e Source
Multiply a scaled matrix by a matrix.
Impure
 getApply :: BLAS2 e => DMatrix s (m, n) e -> DVector t n e -> IO (DVector r m e) Source
Multiply a matrix by a vector.
 getApplyMat :: BLAS3 e => DMatrix s (m, k) e -> DMatrix t (k, n) e -> IO (DMatrix r (m, n) e) Source
Multiply a matrix by a matrix.
 getSApply :: BLAS2 e => e -> DMatrix s (m, n) e -> DVector t n e -> IO (DVector r m e) Source
Multiply a scaled matrix by a vector.
 getSApplyMat :: BLAS3 e => e -> DMatrix s (m, k) e -> DMatrix t (k, n) e -> IO (DMatrix r (m, n) e) Source
Multiply a scaled matrix by a matrix.
Matrix Arithmetic
Pure
 shift :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e Source
Form a new matrix by adding a value to every element in a matrix.
 scale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by scaling another matrix by the given value.
 invScale :: BLAS1 e => e -> Matrix (m, n) e -> Matrix (m, n) e Source
Form a new matrix by dividing every element by a value.
 add :: BLAS1 e => e -> Matrix (m, n) e -> e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by taking the elementwise sum of two matrices.
 plus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by taking the elementwise sum of two matrices.
 minus :: BLAS1 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by taking the elementwise difference of two matrices.
 times :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by taking the elementwise product of two matrices.
 divide :: BLAS2 e => Matrix (m, n) e -> Matrix (m, n) e -> Matrix (m, n) e Source
Create a new matrix by taking the elementwise ratio of two matrices.
Impure
 getShifted :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Form a new matrix by adding a value to every element in a matrix.
 getScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Form a new matrix by multiplying every element by a value.
 getInvScaled :: BLAS1 e => e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Form a new matrix by dividing every element by a value.
 getSum :: BLAS1 e => e -> DMatrix s (m, n) e -> e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Create a new matrix by taking the elementwise sum of two matrices.
 getDiff :: BLAS1 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Create a new matrix by taking the elementwise difference of two matrices.
 getProduct :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Create a new matrix by taking the elementwise product of two matrices.
 getRatio :: BLAS2 e => DMatrix s (m, n) e -> DMatrix t (m, n) e -> IO (DMatrix r (m, n) e) Source
Create a new matrix by taking the elementwise ratio of two matrices.
In-place operations
 doConj :: BLAS1 e => IOMatrix (m, n) e -> IO (IOMatrix (m, n) e) Source
Conjugate every element in a matrix.
 shiftBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () Source
Scale every element by the given value.
 scaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () Source
Scale every element in a matrix by the given value.
 invScaleBy :: BLAS1 e => e -> IOMatrix (m, n) e -> IO () Source
Divide every element by the given value.
 axpy :: BLAS1 e => e -> DMatrix t (m, n) e -> IOMatrix (m, n) e -> IO () Source
 (+=) :: BLAS1 e => IOMatrix (m, n) e -> DMatrix t (m, n) e -> IO () Source