lapack-0.2.2: Numerical Linear Algebra using LAPACK

Numeric.LAPACK.Linear.LowerUpper

Synopsis

# Documentation

data LowerUpper vert horiz height width a Source

Instances

 (Show height, Show width, Show a, Storable a, C height, C width, C vert, C horiz) => Show (LowerUpper vert horiz height width a) (C vert, C horiz, C height, C width, Floating a) => Format (LowerUpper vert horiz height width a)

Constructors

 NonTransposed Transposed

Constructors

 NonConjugated Conjugated

Instances

 Bounded Conjugation Enum Conjugation Eq Conjugation Show Conjugation

data Inversion Source

Constructors

 NonInverted Inverted

Instances

 Bounded Inversion Enum Inversion Eq Inversion Show Inversion

mapExtent :: (C vertA, C horizA) => (C vertB, C horizB) => Map vertA horizA vertB horizB height width -> LowerUpper vertA horizA height width a -> LowerUpper vertB horizB height width aSource

fromMatrix :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> LowerUpper vert horiz height width aSource

`LowerUpper.fromMatrix a` computes the LU decomposition of matrix `a` with row pivotisation.

You can reconstruct `a` from `lu` depending on wether `a` is tall or wide.

``` LU.multiplyP False lu \$ LU.extractL lu <#> LU.tallExtractU lu
LU.multiplyP False lu \$ LU.wideExtractL lu <#> LU.extractU lu
```

toMatrix :: (C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width aSource

solve :: (C vert, C horiz, Eq height, C height, C width, Floating a) => Square height a -> Full vert horiz height width a -> Full vert horiz height width aSource

multiplyFullRight :: (C vert, C horiz, C height, Eq height, C width, C fuse, Eq fuse, Floating a) => LowerUpper vert horiz height fuse a -> Full vert horiz fuse width a -> Full vert horiz height width aSource

determinant :: (C sh, Floating a, Eq a) => Square sh a -> aSource

Caution: `LU.determinant . LU.fromMatrix` will fail for singular matrices.

extractP :: (C vert, C horiz, C height) => Inversion -> LowerUpper vert horiz height width a -> Permutation heightSource

multiplyP :: (C vertA, C horizA, C vertB, C horizB, Eq height, C height, C widthA, C widthB, Floating a) => Inversion -> LowerUpper vertA horizA height widthA a -> Full vertB horizB height widthB a -> Full vertB horizB height widthB aSource

extractL :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width aSource

wideExtractL :: (C horiz, C height, C width, Floating a) => LowerUpper Small horiz height width a -> UnitLower height aSource

wideMultiplyL :: (C horizA, C vert, C horiz, C height, Eq height, C widthA, C widthB, Floating a) => Transposition -> LowerUpper Small horizA height widthA a -> Full vert horiz height widthB a -> Full vert horiz height widthB aSource

`wideMultiplyL transposed lu a` multiplies the square part of `lu` containing the lower triangular matrix with `a`.

``` wideMultiplyL False lu a == wideExtractL lu <#> a
wideMultiplyL True lu a == wideExtractL (Tri.transposeUp lu) <#> a
```

wideSolveL :: (C horizA, C vert, C horiz, C height, Eq height, C width, C nrhs, Floating a) => Transposition -> Conjugation -> LowerUpper Small horizA height width a -> Full vert horiz height nrhs a -> Full vert horiz height nrhs aSource

extractU :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width aSource

tallExtractU :: (C vert, C height, C width, Floating a) => LowerUpper vert Small height width a -> Upper width aSource

tallMultiplyU :: (C vertA, C vert, C horiz, C height, Eq height, C heightA, C widthB, Floating a) => Transposition -> LowerUpper vertA Small heightA height a -> Full vert horiz height widthB a -> Full vert horiz height widthB aSource

`tallMultiplyU transposed lu a` multiplies the square part of `lu` containing the upper triangular matrix with `a`.

``` tallMultiplyU False lu a == tallExtractU lu <#> a
tallMultiplyU True lu a == tallExtractU (Tri.transposeDown lu) <#> a
```

tallSolveU :: (C vertA, C vert, C horiz, C height, C width, Eq width, C nrhs, Floating a) => Transposition -> Conjugation -> LowerUpper vertA Small height width a -> Full vert horiz width nrhs a -> Full vert horiz width nrhs aSource

caseTallWide :: (C vert, C horiz, C height, C width) => LowerUpper vert horiz height width a -> Either (Tall height width a) (Wide height width a)Source