Stability | experimental |
---|---|
Maintainer | Patrick Perry <patperry@stanford.edu> |
Data.Matrix.Class
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.
- class Shaped a (Int, Int) => MatrixShaped a where
- herm :: a (m, n) e -> a (n, m) e
- numRows :: MatrixShaped a => a mn e -> Int
- numCols :: MatrixShaped a => a mn e -> Int
- isSquare :: MatrixShaped a => a mn e -> Bool
- isFat :: MatrixShaped a => a mn e -> Bool
- isTall :: MatrixShaped a => a mn e -> Bool
- flipShape :: (Int, Int) -> (Int, Int)
- class HasVectorView a where
- type VectorView a :: * -> * -> *
- class HasMatrixStorage a where
- type MatrixStorage a :: * -> * -> *
- data OrderEnum
- flipOrder :: OrderEnum -> OrderEnum
- data TransEnum
- flipTrans :: TransEnum -> TransEnum
- data UpLoEnum
- flipUpLo :: UpLoEnum -> UpLoEnum
- data DiagEnum
- data SideEnum
- flipSide :: SideEnum -> SideEnum
- data ConjEnum
- flipConj :: ConjEnum -> ConjEnum
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.
Instances
MatrixShaped IOMatrix | |
MatrixShaped Matrix | |
MatrixShaped IOBanded | |
MatrixShaped Banded | |
MatrixShaped a => MatrixShaped (Herm a) | |
MatrixShaped a => MatrixShaped (Tri a) | |
MatrixShaped (STMatrix s) | |
MatrixShaped (STBanded s) |
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.
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.
Instances
Matrix storage types
Matrix element storage order.
Transpose type.
Lower or upper triangular storage.
Multiplication side.