repa-algorithms-3.4.1.4: Algorithms using the Repa array library.
Safe HaskellNone
LanguageHaskell2010

Data.Array.Repa.Algorithms.Matrix

Description

Algorithms operating on matrices.

These functions should give performance comparable with nested loop C implementations.

If you care deeply about runtime performance then you may be better off using a binding to LAPACK, such as hvector.

Synopsis

Documentation

row :: DIM2 -> Int Source #

Take the row number of a rank-2 index.

col :: DIM2 -> Int Source #

Take the column number of a rank-2 index.

Matrix Multiplication.

mmultP :: Monad m => Array U DIM2 Double -> Array U DIM2 Double -> m (Array U DIM2 Double) Source #

Matrix matrix multiply, in parallel.

mmultS :: Array U DIM2 Double -> Array U DIM2 Double -> Array U DIM2 Double Source #

Matrix matrix multiply, sequentially.

Transposition.

transpose2P :: Monad m => Array U DIM2 Double -> m (Array U DIM2 Double) Source #

Transpose a 2D matrix, in parallel.

transpose2S :: Array U DIM2 Double -> Array U DIM2 Double Source #

Transpose a 2D matrix, sequentially.

Trace.

trace2P :: Monad m => Array U DIM2 Double -> m Double Source #

Get the trace of a (square) 2D matrix, in parallel.

trace2S :: Array U DIM2 Double -> Double Source #

Get the trace of a (square) 2D matrix, sequentially.