Learn R Programming

m2r (version 1.0.3)

snf: Smith normal form

Description

For an integer matrix M, this computes the matrices D, P, and Q such that D = PMQ, which can be seen as an analogue of the singular value decomposition. All are integer matrices, and P and Q are unimodular (have determinants +- 1).

Usage

snf(mat, code = FALSE)

snf.(mat, code = FALSE)

Value

a list of m2_matrix objects with names D, P, and Q

Arguments

mat

a matrix (integer entries)

code

return only the M2 code? (default: FALSE)

See Also

m2_matrix()