Public API

This consists of all of the exported functions and objects available to the end user.

Factorizations

NormalForms.hnfc!Function
hnfc!(M::AbstractMatrix{<:Integer}, R::RoundingMode = NegativeOffDiagonal)
    -> ColumnHermite{eltype(M),typeof(M)}

Calculates the column Hermite normal form of the integer matrix M in-place, returning a ColumnHermite describing the elements of the factorization.

source
NormalForms.hnfcFunction
hnfc(M::AbstractMatrix{T<:Integer}) -> ColumnHermite{T,typeof(M)}
    -> ColumnHermite{eltype(M),typeof(M)}

Calculates the column Hermite normal form of the integer matrix M in-place, returning a ColumnHermite describing the elements of the factorization. Unlike hnfc!(), this function creates a copy of the input matrix rather than modifying it in-place.

source
NormalForms.hnfr!Function
hnfr!(M::AbstractMatrix{<:Integer}, R::RoundingMode = NegativeOffDiagonal)
    -> RowHermite{eltype(M),typeof(M)}

Calculates the row Hermite normal form of the integer matrix M in-place, returning a RowHermite describing the elements of the factorization.

source
NormalForms.hnfrFunction
hnfr(M::AbstractMatrix{<:Integer}, R::RoundingMode = NegativeOffDiagonal)
    -> RowHermite{eltype(M),typeof(M)}

Calculates the row Hermite normal form of the integer matrix M in-place, returning a RowHermite describing the elements of the factorization. Unlike hnfr!(), this function creates a copy of the input matrix rather than modifying it in-place.

source
NormalForms.snf!Function
snf(M::AbstractMatrix{<:Integer}) -> Smith{eltype(M),M}

Calculates the Smith normal form of an integer matrix in-place.

source
NormalForms.snfFunction
snf(M::AbstractMatrix{<:Integer}) -> Smith{eltype(M),M}

Calculates the Smith normal form of an integer matrix, returning a copy of the original matrix.

source

Helper functions

NormalForms.isunimodularFunction
isunimodular(M::AbstractMatrix)

Returns true if a matrix is unimodular. A unimodular matrix is a square integer matrix with A determinant equal to 1 or -1.

source

Factorization objects

NormalForms.AbstractHermiteType
AbstractHermite{T<:Integer,M<:AbstractMatrix{T}} <: Factorization{T}

Supertype for the result of Hermite normal form calculations.

source
NormalForms.RowHermiteType
RowHermite{T<:Integer,M<:AbstractMatrix{T}}

Describes the result of a decomposition of an integer matrix A into its row-style Hermite normal form H, which is upper triangular, and a unimodular matrix U, such that H == U*A, or equivalently, A = U\H.

source
NormalForms.ColumnHermiteType
ColumnHermite{T<:Integer,M<:AbstractMatrix{T}}

Describes the result of a decomposition of an integer matrix A into its row-style Hermite normal form H, which is lower triangular, and a unimodular matrix U, such that H == A*U, or equivalently, A == H/U.

source
NormalForms.SmithType
Smith{T,M<:AbstractMatrix{T}} <: Factorization{T}

Describes the result of the decomposition of an integer matrix A into its Smith normal form S, which is diagonal, and unimodular matrices U and V such that S == U*A*V, or equivalently, A == U\S/V.

source

Reduction modes

NormalForms.NegativeOffDiagonalConstant
NegativeOffDiagonal

Alias for RoundUp. In NormalForms.reduce_cols_off_diagonal!(), this makes all off-diagonal elements the smallest negative value possible.

source
NormalForms.PositiveOffDiagonalConstant
PositiveOffDiagonal

Alias for RoundDown. In NormalForms.reduce_cols_off_diagonal!(), this makes all off-diagonal elements the smallest positive value possible.

source