Cat::Matrix -- the category of
matrices
Introduction represents the category of
matrices over the rng Cat::Matrix(R)R.
Generating
the categoryCat::Matrix(R)
ParametersR |
- | A domain which must be from the category Cat::Rng (a ring without unit). |
Cat::BaseCategory
DetailsCat::Matrix(R) is a matrix of arbitrary
dimension over a component ring R.Cat::Matrix(R):
nrows(A) denotes the number of rows and ncols(A) the number of columns of A.
Further on, a row index is an integer ranges from 1 to nrows(A), and a column index is an integer ranges from 1 to ncols(A).
is set to R.
_index(dom A, row
index i, column index j)A.matdim(dom A)A in form of a list of two positive integers.new(positive integers m, n)"new" of the domain
constructor Dom::Matrix).set_index(dom A, row
index i, column index j, R
x)A by x._negate(dom A)_plus(dom A1, dom
A2..., dom An)An error message is issued if the given matrices do not have the same dimension.
FAIL is returned._subtract(dom A, dom
B)equal(dom A, dom
B)A and
B are equal and returns TRUE,
FALSE or UNKNOWN, respectively.identity(positive integer n)R is of category Cat::Ring, i.e., a ring with unit.iszero(dom A)A is a zero matrix and
returns TRUE or FALSE, respectively.R does not have the axiom
Ax::canonicalRep.transpose(dom A)A.col(dom A, column
index c)c of the
matrix A and returns it as a column vector, i.e., a
nrows(A) x 1 matrix.concatMatrix(dom A, dom B)B to the right side of
the matrix A.delCol(dom A, column
index c)c of the matrix A.A only consists of one column then NIL
is returned.delRow(dom A, row
index r)r of the matrix A.A only consists of one row then NIL is
returned.row(dom A, row index
r)r of the
matrix A and returns it as a row vector, i.e., a 1 x
ncols(A) matrix.setCol(dom A, column
index c, dom v)c of the
matrix A by the column vector v. The vector
v must be a nrows(A) x 1 matrix.setRow(dom A, row
index r, dom v)r of the
matrix A by the row vector v. The vector
v must be a 1 x ncols(A) matrix.stackMatrix(dom A, dom B)B to the lower end of
the matrix A.swapCol(dom A, column
indices c1, c2)c1 with the column with index c2 of
A.swapRow(dom A, row
indices r1, r2)r1 with the row with index r2 of
A.Cat::MatrixCat"dimen" was renamed to
"matdim"."create" was removed (in
Cat::Matrix the default implementation was set to the
method "new"). You may implement this method in the
corresponding domain if necessary.