Safe Haskell | None |
---|---|
Language | Haskell2010 |
- qr :: SpMatrix Double -> (SpMatrix Double, SpMatrix Double)
- lu :: SpMatrix Double -> (SpMatrix Double, SpMatrix Double)
- ilu0 :: SpMatrix Double -> (SpMatrix Double, SpMatrix Double)
- conditionNumberSM :: SpMatrix Double -> Double
- hhMat :: Num a => a -> SpVector a -> SpMatrix a
- hhRefl :: SpVector Double -> SpMatrix Double
- givens :: SpMatrix Double -> IxRow -> IxCol -> SpMatrix Double
- eigsQR :: Int -> SpMatrix Double -> SpVector Double
- eigRayleigh :: Int -> SpMatrix Double -> (SpVector Double, Double) -> (SpVector Double, Double)
- linSolve :: LinSolveMethod -> SpMatrix Double -> SpVector Double -> SpVector Double
- data LinSolveMethod
- (<\>) :: SpMatrix Double -> SpVector Double -> SpVector Double
- cgne :: SpMatrix Double -> SpVector Double -> SpVector Double -> CGNE
- tfqmr :: SpMatrix Double -> SpVector Double -> SpVector Double -> TFQMR
- bicgstab :: SpMatrix Double -> SpVector Double -> SpVector Double -> SpVector Double -> BICGSTAB
- cgs :: SpMatrix Double -> SpVector Double -> SpVector Double -> SpVector Double -> CGS
- bcg :: SpMatrix Double -> SpVector Double -> SpVector Double -> BCG
- _xCgne :: CGNE -> SpVector Double
- _xTfq :: TFQMR -> SpVector Double
- _xBicgstab :: BICGSTAB -> SpVector Double
- _x :: CGS -> SpVector Double
- _xBcg :: BCG -> SpVector Double
- cgsStep :: SpMatrix Double -> SpVector Double -> CGS -> CGS
- bicgstabStep :: SpMatrix Double -> SpVector Double -> BICGSTAB -> BICGSTAB
- data CGNE
- data TFQMR
- data BICGSTAB
- data CGS
- data BCG
- diagPartitions :: SpMatrix a -> (SpMatrix a, SpMatrix a, SpMatrix a)
- randArray :: PrimMonad m => Int -> Double -> Double -> m [Double]
- randMat :: PrimMonad m => Int -> m (SpMatrix Double)
- randVec :: PrimMonad m => Int -> m (SpVector Double)
- randSpMat :: Int -> Int -> IO (SpMatrix Double)
- randSpVec :: Int -> Int -> IO (SpVector Double)
- sparsifySV :: SpVector Double -> SpVector Double
- modifyInspectN :: MonadState s m => Int -> ([s] -> Bool) -> (s -> s) -> m s
- runAppendN' :: (t -> t) -> Int -> t -> [t]
- diffSqL :: Floating a => [a] -> a
Matrix factorizations
qr :: SpMatrix Double -> (SpMatrix Double, SpMatrix Double) Source #
Applies Givens rotation iteratively to zero out sub-diagonal elements
Incomplete LU
ilu0 :: SpMatrix Double -> (SpMatrix Double, SpMatrix Double) Source #
used for Incomplete LU : remove entries in m
corresponding to zero entries in m2
Condition number
Householder reflection
hhRefl :: SpVector Double -> SpMatrix Double Source #
a vector x
uniquely defines an orthogonal plane; the Householder operator reflects any point v
with respect to this plane:
v' = (I - 2 x >< x) v
Givens' rotation
givens :: SpMatrix Double -> IxRow -> IxCol -> SpMatrix Double Source #
Givens method, row version: choose other row index i' s.t. i' is : * below the diagonal * corresponding element is nonzero
QR.C1 ) To zero out entry A(i, j) we must find row k such that A(k, j) is non-zero but A has zeros in row k for all columns less than j.
Eigensolvers
eigsQR :: Int -> SpMatrix Double -> SpVector Double Source #
`eigsQR n mm` performs n
iterations of the QR algorithm on matrix mm
, and returns a SpVector containing all eigenvalues
eigRayleigh :: Int -> SpMatrix Double -> (SpVector Double, Double) -> (SpVector Double, Double) Source #
`eigsRayleigh n mm` performs n
iterations of the Rayleigh algorithm on matrix mm
and returns the eigenpair closest to the initialization. It displays cubic-order convergence, but it also requires an educated guess on the initial eigenpair
Linear solvers
linSolve :: LinSolveMethod -> SpMatrix Double -> SpVector Double -> SpVector Double Source #
Linear solve with _deterministic_ starting vector (every component at 0.1)
(<\>) :: SpMatrix Double -> SpVector Double -> SpVector Double Source #
\ : linSolve using the BiCGSTAB method as default
Methods
bicgstab :: SpMatrix Double -> SpVector Double -> SpVector Double -> SpVector Double -> BICGSTAB Source #
iterate solver until convergence or until max # of iterations is reached
cgs :: SpMatrix Double -> SpVector Double -> SpVector Double -> SpVector Double -> CGS Source #
iterate solver until convergence or until max # of iterations is reached
bicgstabStep :: SpMatrix Double -> SpVector Double -> BICGSTAB -> BICGSTAB Source #
one step of BiCGSTAB
Matrix partitioning
diagPartitions :: SpMatrix a -> (SpMatrix a, SpMatrix a, SpMatrix a) Source #
Partition a matrix into strictly subdiagonal, diagonal and strictly superdiagonal parts
Random arrays
Random matrices and vectors
Sparse "
Sparsify data
Iteration combinators
modifyInspectN :: MonadState s m => Int -> ([s] -> Bool) -> (s -> s) -> m s Source #
Keep a moving window buffer (length 2) of state x
to assess convergence, stop when either a condition on that list is satisfied or when max # of iterations is reached (i.e. same thing as loopUntilAcc
but this one runs in the State monad)
runAppendN' :: (t -> t) -> Int -> t -> [t] Source #
", NO convergence check