Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data QR (t :: Type) (n :: Nat) (m :: Nat) = QR {}
- data LQ (t :: Type) (n :: Nat) (m :: Nat) = LQ {}
- class (PrimBytes t, Ord t, Epsilon t, KnownDim n, KnownDim m) => MatrixQR t (n :: Nat) (m :: Nat) where
- detViaQR :: forall t n. MatrixQR t n n => Matrix t n n -> Scalar t
- inverseViaQR :: forall t n. MatrixQR t n n => Matrix t n n -> Matrix t n n
- qrSolveR :: forall t (n :: Nat) (m :: Nat) (ds :: [Nat]). (MatrixQR t n m, Dimensions ds) => Matrix t n m -> DataFrame t (n :+ ds) -> DataFrame t (m :+ ds)
- qrSolveL :: forall t (n :: Nat) (m :: Nat) (ds :: [Nat]). (MatrixQR t n m, Dimensions ds) => Matrix t n m -> DataFrame t (ds +: m) -> DataFrame t (ds +: n)
Documentation
data QR (t :: Type) (n :: Nat) (m :: Nat) Source #
Result of QR factorization \( A = QR \).
data LQ (t :: Type) (n :: Nat) (m :: Nat) Source #
Result of LQ factorization \( A = LQ \).
class (PrimBytes t, Ord t, Epsilon t, KnownDim n, KnownDim m) => MatrixQR t (n :: Nat) (m :: Nat) where Source #
detViaQR :: forall t n. MatrixQR t n n => Matrix t n n -> Scalar t Source #
Calculate determinant of a matrix via QR decomposition
inverseViaQR :: forall t n. MatrixQR t n n => Matrix t n n -> Matrix t n n Source #
Calculate inverse of a matrix via QR decomposition
qrSolveR :: forall t (n :: Nat) (m :: Nat) (ds :: [Nat]). (MatrixQR t n m, Dimensions ds) => Matrix t n m -> DataFrame t (n :+ ds) -> DataFrame t (m :+ ds) Source #
Compute a QR or LQ decomposition of matrix \( A : n \times m \), and solve a system of linear equations \( Ax = b \).
If \( n >= m \) QR decomposition is used; if \( n > m \) this function solves linear least squares problem. If \( n < m \) (underdetermined system) LQ decomposition is used to yield a minimum norm solution.
qrSolveL :: forall t (n :: Nat) (m :: Nat) (ds :: [Nat]). (MatrixQR t n m, Dimensions ds) => Matrix t n m -> DataFrame t (ds +: m) -> DataFrame t (ds +: n) Source #
Compute a QR or LQ decomposition of matrix \( A : n \times m \), and solve a system of linear equations \( xA = b \).
If \( n <= m \) LQ decomposition is used; if \( n < m \) this function solves linear least squares problem. If \( n > m \) (underdetermined system) QR decomposition is used to yield a minimum norm solution.