dsp-0.2.4: Haskell Digital Signal Processing

Safe HaskellSafe
LanguageHaskell98

Matrix.QR.Givens

Synopsis

Documentation

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

Solve a sparse 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) 
=> Matrix i j a

A

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

QR(A)

The decomposition routine is pretty simple. It does not try to minimize fill-up by a clever ordering of rotations. However, for banded matrices it will work as expected.

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

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

data Rotation i a Source #

Instances

(Show a, Show i) => Show (Rotation i a) Source # 

Methods

showsPrec :: Int -> Rotation i a -> ShowS #

show :: Rotation i a -> String #

showList :: [Rotation i a] -> ShowS #

rotateVector :: (Ix i, Num a) => Rotation i a -> Array i a -> Array i a Source #

data Upper i j a Source #

Instances

(Show a, Show j, Show i) => Show (Upper i j a) Source # 

Methods

showsPrec :: Int -> Upper i j a -> ShowS #

show :: Upper i j a -> String #

showList :: [Upper i j a] -> ShowS #

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 #