-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A lightweight Haskell implementation of Smith normal form over the integers. -- -- This package contains an implementation of Smith normal form for -- arbitrary matrices over the integers. In particular, it does not -- assume that the matrix is invertible or square. @package SmithNormalForm @version 0.1.0.0 module Data.Matrix.SmithNormalForm.Internal -- | Main method that returns the Smith normal form of a given matrix. smithNF :: Integral a => Matrix a -> Matrix a -- | Given a diagonal matrix, outputs a list <math> that satisfies -- <math> and represents the diagonal entries. Assumes input is a -- diagonal matrix (not checked). rectifyDiagonal :: Integral a => Matrix a -> [a] -- | Given a matrix, returns a diagonal matrix obtained by applying -- elementary row and column operations, but which does not necessarily -- satisfy the divisibility property diagonalize :: Integral a => Matrix a -> Matrix a -- | Returns whether a matrix (not necessarily square) is diagonal isDiagonalMatrix :: (Num a, Eq a) => Matrix a -> Bool -- | Returns whether a divides b := <math> and handles the -- special case of <math> divides :: Integral a => a -> a -> Bool module Data.Matrix.SmithNormalForm -- | Returns the Smith normal form of an matrix, i.e. a diagonal matrix -- obtained by applying elementary row and column operations whose -- diagonal entries <math> are such that <math> (Does not -- assume that the matrix is square.) smithNormalForm :: Integral a => Matrix a -> Matrix a -- | Given a matrix M, returns the invariant factors of M, i.e. the list of -- diagonal entries of the Smith normal form of M. invariantFactors :: Integral a => Matrix a -> [a]