Integer matrix
Integer matrix#
- hsnf.column_style_hermite_normal_form(M: numpy.ndarray[Any, numpy.dtype[numpy.int64]]) tuple[numpy.ndarray[Any, numpy.dtype[numpy.int64]], numpy.ndarray[Any, numpy.dtype[numpy.int64]]] [source]#
Calculate column-style Hermite normal form of M Returned matrices (H, R) satisfy
H = np.dot(M, R)
- Parameters
M (array, (m, n)) – Integer matrix
- Returns
H (array, (m, n)) – Hermite normal form of M, lower-triangular integer matrix
R (array, (n, n)) – Unimodular matrix
- hsnf.row_style_hermite_normal_form(M: numpy.ndarray[Any, numpy.dtype[numpy.int64]]) tuple[numpy.ndarray[Any, numpy.dtype[numpy.int64]], numpy.ndarray[Any, numpy.dtype[numpy.int64]]] [source]#
Calculate row-style Hermite normal form of M. Returned matrices (H, L) satisfy
H = np.dot(L, M)
.- Parameters
M (array, (m, n)) – Integer matrix
- Returns
H (array, (m, n)) – Hermite normal form of M, upper-triangular integer matrix
L (array, (m, m)) – Unimodular matrix
- hsnf.smith_normal_form(M: numpy.ndarray[Any, numpy.dtype[numpy.int64]]) tuple[numpy.ndarray[Any, numpy.dtype[numpy.int64]], numpy.ndarray[Any, numpy.dtype[numpy.int64]], numpy.ndarray[Any, numpy.dtype[numpy.int64]]] [source]#
Calculate Smith normal form of integer matrix M. Returned matrices (D, L, R) satisfy
D = np.dot(L, np.dot(M, R))
.- Parameters
M (array, (m, n)) – Integer matrix
- Returns
D (array, (m, n)) – Smith normal form of M
L (array, (m, m)) – Unimodular matrix
R (array, (n, n)) – Unimodular matrix