camfort-0.802: CamFort - Cambridge Fortran infrastructure

Camfort.Specification.Units.SolveHMatrix

Synopsis

# Documentation

Returns given matrix transformed into Reduced Row Echelon Form

List of matrices that when multiplied transform input into Reduced Row Echelon Form

Convert a LinearSystem into an hmatrix and a list of units that are used

Convert an hmatrix and the list of units used back into a LinearSystem

isInconsistentRREF :: (Field t, Eq t) => Matrix t -> Bool Source #

Returns True iff the given matrix in reduced row echelon form represents an inconsistent system of linear equations

Show a matrix with a given number of decimal places.

>>> dispf 2 (1/3 + ident 3)
"3x3\n1.33  0.33  0.33\n0.33  1.33  0.33\n0.33  0.33  1.33\n"

>>> putStr . dispf 2 $(3><4)[1,1.5..] 3x4 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50  >>> putStr . unlines . tail . lines . dispf 2 . asRow$ linspace 10 (0,1)
0.00  0.11  0.22  0.33  0.44  0.56  0.67  0.78  0.89  1.00


lu :: Field t => Matrix t -> (Matrix t, Matrix t, Matrix t, t) #

Explicit LU factorization of a general matrix.

If (l,u,p,s) = lu m then m == p <> l <> u, where l is lower triangular, u is upper triangular, p is a permutation matrix and s is the signature of the permutation.

rank :: Field t => Matrix t -> Int #

Number of linearly independent rows or columns. See also ranksv

takeRows :: Element t => Int -> Matrix t -> Matrix t #