| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Numeric.LAPACK.Linear.LowerUpper
Synopsis
- data LowerUpper vert horiz height width a
- type Square sh = LowerUpper Small Small sh sh
- data Transposition
- data Conjugation
- data 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 a
- fromMatrix :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> LowerUpper vert horiz height width a
- 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 a
- 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 a
- 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 a
- determinant :: (C sh, Floating a, Eq a) => Square sh a -> a
- extractP :: (C vert, C horiz, C height) => Inversion -> LowerUpper vert horiz height width a -> Permutation height
- 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 a
- extractL :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width a
- wideExtractL :: (C horiz, C height, C width, Floating a) => LowerUpper Small horiz height width a -> UnitLower height a
- 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 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 a
- extractU :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width a
- tallExtractU :: (C vert, C height, C width, Floating a) => LowerUpper vert Small height width a -> Upper width a
- 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 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 a
- caseTallWide :: (C vert, C horiz, C height, C width) => LowerUpper vert horiz height width a -> Either (Tall height width a) (Wide height width a)
Documentation
data LowerUpper vert horiz height width a Source #
Instances
| (C vert, C horiz, C height, C width, Storable a, Show height, Show width, Show a) => Show (LowerUpper vert horiz height width a) Source # | |
Defined in Numeric.LAPACK.Linear.LowerUpper Methods showsPrec :: Int -> LowerUpper vert horiz height width a -> ShowS # show :: LowerUpper vert horiz height width a -> String # showList :: [LowerUpper vert horiz height width a] -> ShowS # | |
| (C vert, C horiz, C height, C width, Floating a) => Format (LowerUpper vert horiz height width a) Source # | |
Defined in Numeric.LAPACK.Linear.LowerUpper | |
data Transposition Source #
Constructors
| NonTransposed | |
| Transposed |
Instances
| Bounded Transposition Source # | |
Defined in Numeric.LAPACK.Matrix.Private | |
| Enum Transposition Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods succ :: Transposition -> Transposition # pred :: Transposition -> Transposition # toEnum :: Int -> Transposition # fromEnum :: Transposition -> Int # enumFrom :: Transposition -> [Transposition] # enumFromThen :: Transposition -> Transposition -> [Transposition] # enumFromTo :: Transposition -> Transposition -> [Transposition] # enumFromThenTo :: Transposition -> Transposition -> Transposition -> [Transposition] # | |
| Eq Transposition Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods (==) :: Transposition -> Transposition -> Bool # (/=) :: Transposition -> Transposition -> Bool # | |
| Show Transposition Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods showsPrec :: Int -> Transposition -> ShowS # show :: Transposition -> String # showList :: [Transposition] -> ShowS # | |
data Conjugation Source #
Constructors
| NonConjugated | |
| Conjugated |
Instances
| Bounded Conjugation Source # | |
Defined in Numeric.LAPACK.Matrix.Private | |
| Enum Conjugation Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods succ :: Conjugation -> Conjugation # pred :: Conjugation -> Conjugation # toEnum :: Int -> Conjugation # fromEnum :: Conjugation -> Int # enumFrom :: Conjugation -> [Conjugation] # enumFromThen :: Conjugation -> Conjugation -> [Conjugation] # enumFromTo :: Conjugation -> Conjugation -> [Conjugation] # enumFromThenTo :: Conjugation -> Conjugation -> Conjugation -> [Conjugation] # | |
| Eq Conjugation Source # | |
Defined in Numeric.LAPACK.Matrix.Private | |
| Show Conjugation Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods showsPrec :: Int -> Conjugation -> ShowS # show :: Conjugation -> String # showList :: [Conjugation] -> ShowS # | |
Constructors
| NonInverted | |
| Inverted |
Instances
| Bounded Inversion Source # | |
| Enum Inversion Source # | |
Defined in Numeric.LAPACK.Matrix.Private Methods succ :: Inversion -> Inversion # pred :: Inversion -> Inversion # fromEnum :: Inversion -> Int # enumFrom :: Inversion -> [Inversion] # enumFromThen :: Inversion -> Inversion -> [Inversion] # enumFromTo :: Inversion -> Inversion -> [Inversion] # enumFromThenTo :: Inversion -> Inversion -> Inversion -> [Inversion] # | |
| Eq Inversion Source # | |
| Show Inversion Source # | |
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 a Source #
fromMatrix :: (C vert, C horiz, C height, C width, Floating a) => Full vert horiz height width a -> LowerUpper 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 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 a Source #
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 a Source #
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 a Source #
determinant :: (C sh, Floating a, Eq a) => Square sh a -> a Source #
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 height Source #
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 a Source #
extractL :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width a Source #
wideExtractL :: (C horiz, C height, C width, Floating a) => LowerUpper Small horiz height width a -> UnitLower height a Source #
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 a Source #
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 a Source #
extractU :: (C vert, C horiz, C height, C width, Floating a) => LowerUpper vert horiz height width a -> Full vert horiz height width a Source #
tallExtractU :: (C vert, C height, C width, Floating a) => LowerUpper vert Small height width a -> Upper width a Source #
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 a Source #
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 a Source #
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 #