Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- class Property property => SqRt property
- sqrt :: (SqRt property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Real a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a
- sqrtSchur :: (C sh, Real a) => Square sh a -> Square sh a
- sqrtDenmanBeavers :: (Homogeneous prop, Additive prop) => (Packing pack, PowerStrip lower, PowerStrip upper) => (C sh, Floating a, RealOf a ~ ar, Real ar) => Quadratic pack prop lower upper sh a -> Quadratic pack prop lower upper sh a
- class Property property => Exp property
- exp :: (Exp property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Floating a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a
- expRealHermitian :: (Packing pack, C sh, Real a) => HermitianP pack sh a -> HermitianPosSemidefP pack sh a
- class Property property => Log property
- log :: (Log property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Real a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a
- logUnipotentUpper :: (Packing pack, C sh, Floating a) => UnitUpperP pack sh a -> UpperP pack sh a
- class Property property => LiftReal property
- liftReal :: (LiftReal property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Real a) => (a -> a) -> Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a
Documentation
class Property property => SqRt property Source #
Instances
SqRt Arbitrary Source # | For Full matrices:
Explicit solution for matrices up to size 2.
Solution via |
Defined in Numeric.LAPACK.Matrix.Function | |
SqRt Symmetric Source # | |
Defined in Numeric.LAPACK.Matrix.Function | |
SqRt Unit Source # | |
Defined in Numeric.LAPACK.Matrix.Function | |
(neg ~ False, C zero, C pos) => SqRt (Hermitian neg zero pos) Source # | |
Defined in Numeric.LAPACK.Matrix.Function |
sqrt :: (SqRt property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Real a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a Source #
sqrtSchur :: (C sh, Real a) => Square sh a -> Square sh a Source #
Square root solver that works on the Schur decomposition.
Schur decomposition enables computing the square root
of (some) singular matrices like ((1,0),(0,0))
.
However, the Schur decomposition might emit small negative values
on the diagonal, where exact computation would yield zeros.
This would let the square root solver fail.
And there are singular matrices that have no square root, at all,
e.g. ((0,1),(0,0))
.
The solver is restricted to a real triangular Schur matrix.
The check for non-real eigenvalues may exclude matrices
that actually have a real-valued square root.
E.g. sqrt ((0,-2),(2,0)) = ((1,-1),(1,-1))
In the future we might fix this
by solving 2x2 blocks at the diagonal using sqrt2
.
sqrtDenmanBeavers :: (Homogeneous prop, Additive prop) => (Packing pack, PowerStrip lower, PowerStrip upper) => (C sh, Floating a, RealOf a ~ ar, Real ar) => Quadratic pack prop lower upper sh a -> Quadratic pack prop lower upper sh a Source #
Iterative square root solver, similar to Newton iteration.
Eigenvalues must all be positive, otherwise, the iteration might loop forever, or if an eigenvalue is zero, the computation of matrix inverse will fail.
exp :: (Exp property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Floating a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a Source #
expRealHermitian :: (Packing pack, C sh, Real a) => HermitianP pack sh a -> HermitianPosSemidefP pack sh a Source #
Mathematically the name expRealSymmetric
would be more common,
but we support definiteness tags only for the Hermitian
type.
Formally the result is always positive definite,
but negative eigenvalues easily yield numerically singular matrices as result.
log :: (Log property, Packing pack, PowerStrip lower, PowerStrip upper, C sh, Real a) => Quadratic pack property lower upper sh a -> Quadratic pack property lower upper sh a Source #
logUnipotentUpper :: (Packing pack, C sh, Floating a) => UnitUpperP pack sh a -> UpperP pack sh a Source #
class Property property => LiftReal property Source #
Instances
LiftReal Arbitrary Source # | Generic algorithm that applies a scalar function to the elements of the diagonal factor of a full, triangular or diagonal matrix with distinct eigenvalues. It is not checked whether the matrix has distinct eigenvalues. |
Defined in Numeric.LAPACK.Matrix.Function | |
LiftReal Symmetric Source # | |
Defined in Numeric.LAPACK.Matrix.Function | |
(neg ~ True, zero ~ True, pos ~ True) => LiftReal (Hermitian neg zero pos) Source # | |
Defined in Numeric.LAPACK.Matrix.Function |