The class is for matrix whose coefficient ring belongs ring. It is a subclass of Matrix.
row and column must be a positive integer.
compo must be a list form.
coeff_ring must be an instance of ring.Ring.
In general, given matrix size and coefficient ring unspecified, you should call createMatrix for your profit.
Return the coefficient ring. This method checks all elements of self and set coeff_ring to the valid coefficient ring.
Change the class of the matrix to FieldMatrix, where the coefficient ring will be the quotient field of the current domain.
Change the class of the matrix to Subspace, where the coefficient ring will be the quotient field of the current domain.
Compute upper triangular hermite normal form(HNF).
Ex.
>>> A = matrix.Matrix(3, 4, [1,2,3,4,5,6,7,8,9,-1,-2,-3]) >>> print A.hermiteNormalForm() 0 36 29 28 0 0 1 0 0 0 0 1
operator | explanation |
M + N | Return the sum of matrices M and N. |
M - N | Return the difference of matrices M and N. |
M * N | Return the product of M and N. N must be matrix,vector or scaler |
M % d | Return M modulo d. d must be nonzero integer. |
-M | Return the matrix whose coefficients have inverted signs of M. |
+M | Return the copy of M. |