Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- leastSquares :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> Array i a -> Array j a
- decompose :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> ([Reflection i a], Upper i j a)
- solve :: (Ix i, Ix j, Fractional a) => ([Reflection i a], Upper i j a) -> Array i a -> Array j a
- det :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> a
- data Reflection i a
- reflectMatrix :: (Ix i, Ix j, Num a) => Reflection i a -> Array (i, j) a -> Array (i, j) a
- reflectVector :: (Ix i, Num a) => Reflection i a -> Array i a -> Array i a
- data Upper i j a
- matrixFromUpper :: (Ix i, Ix j, Num a) => Upper i j a -> Array (i, j) a
- solveUpper :: (Ix i, Ix j, Fractional a) => Upper i j a -> Array i a -> Array j a
- detUpper :: (Ix i, Ix j, Fractional a) => Upper i j a -> a
Documentation
leastSquares :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> Array i a -> Array j a Source #
Solve an overconstrained linear problem, i.e. minimize ||Ax-b||
.
A
must have dimensions m x n
with m>=n
and it must have full-rank.
None of these conditions is checked.
solve :: (Ix i, Ix j, Fractional a) => ([Reflection i a], Upper i j a) -> Array i a -> Array j a Source #
data Reflection i a Source #
reflectMatrix :: (Ix i, Ix j, Num a) => Reflection i a -> Array (i, j) a -> Array (i, j) a Source #
reflectVector :: (Ix i, Num a) => Reflection i a -> Array i a -> Array i a Source #
solveUpper :: (Ix i, Ix j, Fractional a) => Upper i j a -> Array i a -> Array j a Source #
Assumes that Upper
matrix is at least as high as wide
and that it has full rank.