repa-algorithms-3.4.1.3: Algorithms using the Repa array library.

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Algorithms.Matrix

Contents

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 #

Take the row number of a rank-2 index.

col :: DIM2 -> Int #

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) #

Matrix matrix multiply, in parallel.

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

Matrix matrix multiply, sequentially.

Transposition.

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

Transpose a 2D matrix, in parallel.

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

Transpose a 2D matrix, sequentially.

Trace.

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

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

trace2S :: Array U DIM2 Double -> Double #

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