NormalForms.jl

Calculation of Hermite and Smith normal forms in a single package.
Author brainandforce
Popularity
5 Stars
Updated Last
3 Months Ago
Started In
November 2022

NormalForms.jl

Documentation (stable) Documentation (dev) CI status Codecov Aqua.jl

This package allows for the calculation of both the Hermite and Smith normal forms, which are commonly used throughout crystallography.

Packages to calculate the Smith and Hermite normal forms already exist, but this package provides several advantages. First, it integrates into pre-existing infrastructure provided by the LinearAlgebra standard library by exporting the RowHermite, ColumnHermite, and Smith types, which are subtypes of LinearAlgebra.Factorization. Second, effort has been made to thoroughly comment the code so the algorithms can be easily understood. Third, the code is integrated with StaticArrays.jl, and methods are available for SMatrix, which cannot be mutated in-place.

This package is written to be compatible with the latest LTS (Julia 1.6.7 as of the most recent commit).

Installation

NormalForms.jl is now in the Julia package registry! To install, just use the package manager:

(@v1.6+) pkg> add NormalForms

Alternatively:

julia> import Pkg

Pkg.add("NormalForms")

You can also add the repo URL, with an optional specifier for the branch you want to track. By default, it tracks main. release matches the package state in the General repo.

(@v1.6+) pkg> add https://github.com/brainandforce/NormalForms.jl#branchname

Alternatively:

julia> import Pkg

Pkg.add("https://github.com/brainandforce/NormalForms.jl", rev="branchname")

To-do list

This package is not in a finished state. The primary block to this is that some matrices cannot be placed in Hermite or Smith normal form because the unimodular factors fail to be unimodular. As of now, it's unclear what causes this to happen, but the solution may come in more extensive testing.

See also

For those interested in the Hermite and Smith normal forms in the context of abstract algebra:

Required Packages

Used By Packages