nzmath.matrix

Matrix

The class is for matrix.

Constructor

Matrix(row, column, compo)

row and column must be a positive integer, and assuming row not be equal to column.
compo must be a list form.

In general, given matrix size unspecified, you should call createMatrix for your profit.

Methods

copy()

create a copy of self (other instance).

set(list)

setRow(m, arg)

setColumn(n, arg)

getRow(i)

getColumn(j)

swapRow(m1, m2)

swapColumn(n1, n2)

insertRow(i, arg)

insertColumn(j, arg)

deleteRow(i)

deleteColumn(j)

transpose()

triangulate()

return upper triangulated matrix.

isUpperTriangularMatrix()

isLowerTriangularMatrix()

subMatrix(i,j)

return submatrix deleted i-th row and j-th column.

kernel()

image()

rank()

inverseimage(V)

columnEchelonForm()

Operators

operatorexplanation
M + NReturn the sum of matrices M and N.
M - NReturn the difference of matrices M and N.
M * NReturn the product of M and N. N must be matrix,vector or scaler
M / dReturn the division of M by d. d must be scalar.
-MReturn the matrix whose coefficients have inverted signs of M.
+MReturn the same matrix with M. Simplification is carried out if possible.
M == NReturn whether M and N are equal or not.
M != NReturn whether M and N are different or not.
M[i,j]Return the coefficient of i-th row, j-th column term of matrix M.
M[i]Return the vector of i-th column term of matrix M.
M[i,j] = cReplace the coefficient of i-th row, j-th column term of matrix M by c.
M[j] = cReplace the vector of i-th column term of matrix M by vector c.
repr(M)Return the repr string of the matrix M.
string represents list concatenated row vector lists.
str(M)Return the str string of the matrix M.

Last-modified: 2006-08-07 (·î) 23:07:58