blas-0.7.1: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Matrix.Class

Contents

Description

Common functionality for the types defined in Data.Matrix.Dense.Class and Data.Matrix.Banded.Class, and a base class for the mutable and immutable matrix classes defined in the submodules of this one.

Synopsis

Matrix shape

class Shaped a (Int, Int) => MatrixShaped a whereSource

A base class for objects shaped like matrices.

Methods

herm :: a (m, n) e -> a (n, m) eSource

Creates a new matrix view that conjugates and transposes the given matrix.

numRows :: MatrixShaped a => a mn e -> IntSource

Get the number of rows in the matrix.

numCols :: MatrixShaped a => a mn e -> IntSource

Get the number of rows in the matrix.

isSquare :: MatrixShaped a => a mn e -> BoolSource

Indicate whether or not a matrix has the same number of rows and columns.

isFat :: MatrixShaped a => a mn e -> BoolSource

Indicate whether or not the number of rows is less than or equal to the number of columns.

isTall :: MatrixShaped a => a mn e -> BoolSource

Indicate whether or not the number of rows is greater than or equal to the number of columns.

flipShape :: (Int, Int) -> (Int, Int)Source

Replaces (m,n) with (n,m)

Associated types for matrices

class HasVectorView a Source

A class for matrices with an associated type for row, column, and diagonal vector views.

Associated Types

type VectorView a :: * -> * -> *Source

An associated type for a vector view into a matrix type a. Typically, the view will share the same storage as the matrix, so that modifying an element in the view will affect the corresponding element in the matrix, and vice versa.

class HasMatrixStorage a Source

A class for matrix types that use a matrix internally for storage, Data.Matrix.Banded.Class for example.

Associated Types

type MatrixStorage a :: * -> * -> *Source

An associated type for the underlying matrix storage.

Matrix storage types

data OrderEnum Source

Matrix element storage order.

Constructors

RowMajor 
ColMajor 

data TransEnum Source

Transpose type.

Constructors

NoTrans 
ConjTrans 

data UpLoEnum Source

Lower or upper triangular storage.

Constructors

Upper 
Lower 

data DiagEnum Source

Diagonal storage.

Constructors

Unit 
NonUnit 

data SideEnum Source

Multiplication side.

Constructors

LeftSide 
RightSide 

flipOrder :: OrderEnum -> OrderEnumSource

Exchange RowMajor and ColMajor.

flipTrans :: TransEnum -> TransEnumSource

Exchange NoTrans and ConjTrans.

flipUpLo :: UpLoEnum -> UpLoEnumSource

Exchange Upper and Lower.

flipSide :: SideEnum -> SideEnumSource

Exchange LeftSide and RigthSide.