Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
smithNF :: Integral a => Matrix a -> Matrix a Source #
Main method that returns the Smith normal form of a given matrix.
rectifyDiagonal :: Integral a => Matrix a -> [a] Source #
Given a diagonal matrix, outputs a list \([d_1,..,d_n]\) that satisfies \(d_k \mid d_{k+1}\) and represents the diagonal entries. Assumes input is a diagonal matrix (not checked).
diagonalize :: Integral a => Matrix a -> Matrix a Source #
Given a matrix, returns a diagonal matrix obtained by applying elementary row and column operations, but which does not necessarily satisfy the divisibility property