Safe Haskell | Safe-Infered |
---|

- staircase :: Integral α => SparseMatrix α -> (SparseMatrix α, SparseMatrix α)
- staircase' :: Integral a => SparseMatrix a -> SparseMatrix a -> (SparseMatrix a, SparseMatrix a)
- clearColumn :: Integral t => Index -> Index -> SparseMatrix t -> SparseMatrix t -> (SparseMatrix t, SparseMatrix t)
- extGCD :: (Num α, Integral α) => α -> α -> (SparseVector α, SparseVector α)

# Documentation

staircase :: Integral α => SparseMatrix α -> (SparseMatrix α, SparseMatrix α)Source

Staircase Form of matrix.

It uses an identity matrix as initial protocol matrix for `staircase'`

.

It returns also transformation matrix:

`>>>`

True`let (s, t) = staircase m in t × m == s`

Usage of `divMod`

causes `Integral`

context. (TODO: eliminate it)

Method: Gauss method applied to the rows of matrix. Though α may be not a field, we repeat the remainder division to obtain zeroes down in the column.

staircase' :: Integral a => SparseMatrix a -> SparseMatrix a -> (SparseMatrix a, SparseMatrix a)Source

Staircase Form of matrix.

It takes matrix itself and initial protocol matrix and applies all transformations to both of them in the same way, and then returns matrix in the staircase form and a transformation matrix.

Usage of `divMod`

causes `Integral`

context. (TODO: eliminate it)

Method: Gauss method applied to the rows of matrix. Though α may be not a field, we repeat the remainder division to obtain zeroes down in the column.

:: Integral t | |

=> Index | row index (clears column beneath this row) |

-> Index | column index |

-> SparseMatrix t | matrix itself |

-> SparseMatrix t | protocol matrix |

-> (SparseMatrix t, SparseMatrix t) | result matrix and changed protocol matrix |

Fills column with zeroes

extGCD :: (Num α, Integral α) => α -> α -> (SparseVector α, SparseVector α)Source

Extended Euclid algorithm