Stability | experimental |
---|---|
Maintainer | Patrick Perry <patperry@stanford.edu> |
Triangular views of matrices.
- data Tri a np e = Tri UpLoEnum DiagEnum (a np e)
- triFromBase :: UpLoEnum -> DiagEnum -> a (n, p) e -> Tri a (n, p) e
- triToBase :: Tri a (n, p) e -> (UpLoEnum, DiagEnum, a (n, p) e)
- mapTri :: (a np e -> b np' e) -> Tri a np e -> Tri b np' e
- lower :: MatrixShaped a => a (n, p) e -> Tri a (n, p) e
- lowerU :: MatrixShaped a => a (n, p) e -> Tri a (n, p) e
- upper :: MatrixShaped a => a (n, p) e -> Tri a (n, p) e
- upperU :: MatrixShaped a => a (n, p) e -> Tri a (n, p) e
- coerceTri :: Tri a np e -> Tri a np' e
- module Data.Matrix.Class.ISolve
- module Data.Matrix.Class.MSolve
Triangular matrix types
A triangular or trapezoidal view of an underlying matrix. The view
can either be of the upper or lower triangular part of the matrix, and
can optionally include or exclude the diagonal. If the diagonal enum
is Unit
, the diagonal entries of the underlying matrix are not
referenced, but are assumed to be 1
. The type arguments are as follows:
-
a
: the underlyting matrix type. -
np
: a phantom type for the shape of the view. -
e
: the element type of the matrix.
MatrixShaped a => MatrixShaped (Tri a) | |
BLAS3 e => IMatrix (Tri Matrix) e | |
BLAS3 e => IMatrix (Tri Banded) e | |
BLAS3 e => ISolve (Tri Matrix) e | |
BLAS3 e => ISolve (Tri Banded) e | |
BLAS3 e => MSolve (Tri IOMatrix) e IO | |
BLAS3 e => MSolve (Tri Matrix) e IO | |
BLAS3 e => MSolve (Tri IOBanded) e IO | |
BLAS3 e => MSolve (Tri Banded) e IO | |
BLAS3 e => MMatrix (Tri IOMatrix) e IO | |
BLAS3 e => MMatrix (Tri Matrix) e IO | |
BLAS3 e => MMatrix (Tri IOBanded) e IO | |
BLAS3 e => MMatrix (Tri Banded) e IO | |
BLAS3 e => MSolve (Tri Matrix) e (ST s) | |
BLAS3 e => MSolve (Tri (STMatrix s)) e (ST s) | |
BLAS3 e => MSolve (Tri Banded) e (ST s) | |
BLAS3 e => MSolve (Tri (STBanded s)) e (ST s) | |
BLAS3 e => MMatrix (Tri Matrix) e (ST s) | |
BLAS3 e => MMatrix (Tri (STMatrix s)) e (ST s) | |
BLAS3 e => MMatrix (Tri Banded) e (ST s) | |
BLAS3 e => MMatrix (Tri (STBanded s)) e (ST s) | |
MatrixShaped a => Shaped (Tri a) (Int, Int) | |
(Show (a (n, p) e), MatrixShaped a) => Show (Tri a (n, p) e) |
triFromBase :: UpLoEnum -> DiagEnum -> a (n, p) e -> Tri a (n, p) eSource
Convert from a base matrix type to a triangular view.
triToBase :: Tri a (n, p) e -> (UpLoEnum, DiagEnum, a (n, p) e)Source
Convert from a triangular view to the base matrix.
mapTri :: (a np e -> b np' e) -> Tri a np e -> Tri b np' eSource
Apply a function to the base matrix.
lower :: MatrixShaped a => a (n, p) e -> Tri a (n, p) eSource
Get a lower triangular view of a matrix.
lowerU :: MatrixShaped a => a (n, p) e -> Tri a (n, p) eSource
Get a lower triangular view of a matrix, with unit diagonal.
upper :: MatrixShaped a => a (n, p) e -> Tri a (n, p) eSource
Get an upper triangular view of a matrix.
upperU :: MatrixShaped a => a (n, p) e -> Tri a (n, p) eSource
Get an upper triangular view of a matrix, with unit diagonal.
Overloaded interface for solving linear systems
module Data.Matrix.Class.ISolve
module Data.Matrix.Class.MSolve