Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- type LowerUpper = LowerUpperFlex Filled Filled
- type Tall height width = LowerUpper Size Big Small height width
- type Wide height width = LowerUpper Size Small Big height width
- type Square sh = SquareMeas Shape sh sh
- type LiberalSquare height width = SquareMeas Size height width
- data Transposition
- data Conjugation
- data Inversion
- 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
- 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
- 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
- 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
- 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
- determinant :: (Measure meas, C height, C width, Floating a) => LowerUpperFlex lower upper meas Small Small height width a -> a
- extractP :: (Measure meas, C vert, C horiz, Permutable height, C width) => Inversion -> LowerUpper meas vert horiz height width a -> Permutation height a
- 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
- 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
- wideExtractL :: (Measure meas, C horiz, Permutable height, C width, Floating a) => LowerUpper meas Small horiz height width a -> UnitLower height a
- 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
- 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
- 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
- tallExtractU :: (Measure meas, C vert, C height, Permutable width, Floating a) => LowerUpper meas vert Small height width a -> Upper width a
- 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
- 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
- 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)
Documentation
type LowerUpper = LowerUpperFlex Filled Filled Source #
type LiberalSquare height width = SquareMeas Size height width Source #
data Transposition #
Instances
data Conjugation #
Instances
Instances
Bounded Inversion | |
Enum Inversion | |
Defined in Numeric.BLAS.Matrix.Modifier 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 | |
Show Inversion | |
Semigroup Inversion | |
Monoid Inversion | |
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 #