dsp-0.2.5.1: Haskell Digital Signal Processing

Safe HaskellSafe
LanguageHaskell98

Matrix.QR.Householder

Synopsis

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.

decompose Source #

Arguments

:: (Ix i, Enum i, Ix j, Enum j, RealFloat a) 
=> Array (i, j) a

A

-> ([Reflection i a], Upper i j a)

QR(A)

solve :: (Ix i, Ix j, Fractional a) => ([Reflection i a], Upper i j a) -> Array i a -> Array j a Source #

det :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> a Source #

Only sensible for square matrices, but the function does not check whether the matrix is square.

For non-square matrices the sign is not of much use. It depends on the implementation. It is not uniquely defined by requiring that the determinant of the orthogonal transformation has positive sign.

detAbs :: (Ix i, Enum i, Ix j, Enum j, RealFloat a) => Array (i, j) a -> a Source #

Absolute value of the determinant. This is also sound for non-square matrices.

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 #

data Upper i j a Source #

matrixFromUpper :: (Ix i, Ix j, Num a) => Upper i j a -> Array (i, j) 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.

detUpper :: (Ix i, Ix j, Fractional a) => Upper i j a -> a Source #