SmithNormalForm-0.1.0.0: A lightweight Haskell implementation of Smith normal form over the integers.
Safe HaskellNone
LanguageHaskell2010

Data.Matrix.SmithNormalForm

Synopsis

Documentation

smithNormalForm :: Integral a => Matrix a -> Matrix a Source #

Returns the Smith normal form of an matrix, i.e. a diagonal matrix obtained by applying elementary row and column operations whose diagonal entries \([d_1,..,d_n]\) are such that \(d_k | d_{k+1}\) (Does not assume that the matrix is square.)

invariantFactors :: Integral a => Matrix a -> [a] Source #

Given a matrix M, returns the invariant factors of M, i.e. the list of diagonal entries of the Smith normal form of M.