blas-0.7.6: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Matrix.Tri

Contents

Description

Triangular views of matrices.

Synopsis

Triangular matrix types

data Tri a np e Source

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.

Constructors

Tri UpLoEnum DiagEnum (a np e) 

Instances

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.

coerceTri :: Tri a np e -> Tri a np' eSource

Cast the phantom shape type.

Overloaded interface for solving linear systems