lapack-0.5.1: Numerical Linear Algebra using LAPACK

Safe HaskellNone
LanguageHaskell98

Numeric.LAPACK.Linear.LowerUpper

Synopsis

Documentation

type LowerUpper = LowerUpperFlex Filled Filled Source #

type Tall height width = LowerUpper Size Big Small height width Source #

type Wide height width = LowerUpper Size Small Big height width Source #

type Square sh = SquareMeas Shape sh sh Source #

type LiberalSquare height width = SquareMeas Size height width Source #

data Transposition #

Constructors

NonTransposed 
Transposed 

mapExtent :: (C vertA, C horizA) => (C vertB, C horizB) => Map measA vertA horizA measB vertB horizB height width -> LowerUpperFlex lower upper measA vertA horizA height width a -> LowerUpperFlex lower upper measB vertB horizB height width a Source #

fromMatrix :: (Measure meas, C vert, C horiz, C height, C width, Floating a) => Full meas vert horiz height width a -> LowerUpper meas vert horiz height width a Source #

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

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

LU.multiplyP NonInverted lu $ LU.extractL lu ##*# LU.tallExtractU lu
LU.multiplyP NonInverted lu $ LU.wideExtractL lu #*## LU.extractU lu

toMatrix :: (Measure meas, C vert, C horiz, C height, Eq height, C width, Eq width, Floating a) => LowerUpper meas vert horiz height width a -> Full meas vert horiz height width a Source #

solve :: (Measure meas, C vert, C horiz, Eq height, C height, C width, Floating a) => Square height a -> Full meas vert horiz height width a -> Full meas vert horiz height width a Source #

multiplyFull :: (Measure meas, C vert, C horiz, C height, Eq height, C width, C fuse, Eq fuse, Floating a) => LowerUpper meas vert horiz height fuse a -> Full meas vert horiz fuse width a -> Full meas vert horiz height width a Source #

determinant :: (Measure meas, C height, C width, Floating a) => LowerUpperFlex lower upper meas Small Small height width a -> a Source #

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

extractP :: (Measure meas, C vert, C horiz, Permutable height, C width) => Inversion -> LowerUpper meas vert horiz height width a -> Permutation height a Source #

multiplyP :: (Measure measA, C vertA, C horizA, Measure measB, C vertB, C horizB, Eq height, Permutable height, C widthA, C widthB, Floating a) => Inversion -> LowerUpper measA vertA horizA height widthA a -> Full measB vertB horizB height widthB a -> Full measB vertB horizB height widthB a Source #

extractL :: (Measure meas, C vert, C horiz, Permutable height, Permutable width, Floating a) => LowerUpper meas vert horiz height width a -> LowerTrapezoid meas vert horiz height width a Source #

wideExtractL :: (Measure meas, C horiz, Permutable height, C width, Floating a) => LowerUpper meas Small horiz height width a -> UnitLower height a Source #

wideMultiplyL :: (Measure measA, C horizA, Measure meas, C vert, C horiz, Permutable height, Eq height, C widthA, C widthB, Floating a) => Transposition -> LowerUpper measA Small horizA height widthA a -> Full meas vert horiz height widthB a -> Full meas vert horiz height widthB a Source #

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

wideMultiplyL NonTransposed lu a == wideExtractL lu #*## a
wideMultiplyL Transposed lu a == Tri.transpose (wideExtractL lu) #*## a

wideSolveL :: (Measure measA, C horizA, Measure meas, C vert, C horiz, Permutable height, Eq height, C width, C nrhs, Floating a) => Transposition -> Conjugation -> LowerUpper measA Small horizA height width a -> Full meas vert horiz height nrhs a -> Full meas vert horiz height nrhs a Source #

extractU :: (Measure meas, C vert, C horiz, Permutable height, Permutable width, Floating a) => LowerUpper meas vert horiz height width a -> UpperTrapezoid meas vert horiz height width a Source #

tallExtractU :: (Measure meas, C vert, C height, Permutable width, Floating a) => LowerUpper meas vert Small height width a -> Upper width a Source #

tallMultiplyU :: (Measure measA, C vertA, Measure meas, C vert, C horiz, Permutable height, Eq height, C heightA, C widthB, Floating a) => Transposition -> LowerUpper measA vertA Small heightA height a -> Full meas vert horiz height widthB a -> Full meas vert horiz height widthB a Source #

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

tallMultiplyU NonTransposed lu a == tallExtractU lu #*## a
tallMultiplyU Transposed lu a == Tri.transpose (tallExtractU lu) #*## a

tallSolveU :: (Measure measA, C vertA, Measure meas, C vert, C horiz, C height, Permutable width, Eq width, C nrhs, Floating a) => Transposition -> Conjugation -> LowerUpper measA vertA Small height width a -> Full meas vert horiz width nrhs a -> Full meas vert horiz width nrhs a Source #

caseTallWide :: (Measure meas, C vert, C horiz, C height, C width) => LowerUpperFlex lower upper meas vert horiz height width a -> Either (Tall height width a) (Wide height width a) Source #