RectangularMatrixCategory(m, n, R, Row, Col)

matcat.spad line 706 [edit on github]

RectangularMatrixCategory is a category of matrices of fixed dimensions. The dimensions of the matrix will be parameters of the domain. Domains in this category will be R-modules and will be non-mutable.

# : % -> NonNegativeInteger
from Aggregate
* : (%, R) -> %
from RightModule(R)
* : (R, %) -> %
from LeftModule(R)
* : (Integer, %) -> % if R has AbelianGroup
from AbelianGroup
* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
- : % -> % if R has AbelianGroup
from AbelianGroup
- : (%, %) -> % if R has AbelianGroup
from AbelianGroup
/ : (%, R) -> % if R has Field

m/r divides the elements of m by r. Error: if r = 0.

0 : () -> %
from AbelianMonoid
= : (%, %) -> Boolean
from BasicType
antisymmetric? : % -> Boolean

antisymmetric?(m) returns true if the matrix m is square and antisymmetric (i.e. m[i, j] = -m[j, i] for all i and j) and false otherwise.

any? : (Mapping(Boolean, R), %) -> Boolean
from HomogeneousAggregate(R)
coerce : % -> OutputForm
from CoercibleTo(OutputForm)
column : (%, Integer) -> Col

column(m, j) returns the jth column of the matrix m. Error: if the index outside the proper range.

columnSpace : % -> List(Col) if R has EuclideanDomain

columnSpace(m) returns a sublist of columns of the matrix m forming a basis of its column space.

convert : % -> InputForm if R has Finite
from ConvertibleTo(InputForm)
copy : % -> %
from Aggregate
count : (R, %) -> NonNegativeInteger
from HomogeneousAggregate(R)
count : (Mapping(Boolean, R), %) -> NonNegativeInteger
from HomogeneousAggregate(R)
diagonal? : % -> Boolean

diagonal?(m) returns true if the matrix m is square and diagonal (i.e. all entries of m not on the diagonal are zero) and false otherwise.

elt : (%, Integer, Integer) -> R

elt(m, i, j) returns the element in the ith row and jth column of the matrix m. Error: if indices are outside the proper ranges.

elt : (%, Integer, Integer, R) -> R

elt(m, i, j, r) returns the element in the ith row and jth column of the matrix m, if m has an ith row and a jth column, and returns r otherwise.

empty : () -> %
from Aggregate
empty? : % -> Boolean
from Aggregate
enumerate : () -> List(%) if R has Finite
from Finite
eq? : (%, %) -> Boolean
from Aggregate
eval : (%, R, R) -> % if R has Evalable(R)
from InnerEvalable(R, R)
eval : (%, Equation(R)) -> % if R has Evalable(R)
from Evalable(R)
eval : (%, List(R), List(R)) -> % if R has Evalable(R)
from InnerEvalable(R, R)
eval : (%, List(Equation(R))) -> % if R has Evalable(R)
from Evalable(R)
every? : (Mapping(Boolean, R), %) -> Boolean
from HomogeneousAggregate(R)
exquo : (%, R) -> Union(%, "failed") if R has IntegralDomain

exquo(m, r) computes the exact quotient of the elements of m by r, returning "failed" if this is not possible.

hash : % -> SingleInteger if R has Finite
from Hashable
hashUpdate! : (HashState, %) -> HashState if R has Finite
from Hashable
index : PositiveInteger -> % if R has Finite
from Finite
latex : % -> String
from SetCategory
less? : (%, NonNegativeInteger) -> Boolean
from Aggregate
listOfLists : % -> List(List(R))

listOfLists(m) returns the rows of the matrix m as a list of lists.

lookup : % -> PositiveInteger if R has Finite
from Finite
map : (Mapping(R, R), %) -> %

map(f, a) returns b, where b(i, j) = a(i, j) for all i, j.

map : (Mapping(R, R, R), %, %) -> %

map(f, a, b) returns c, where c is such that c(i, j) = f(a(i, j), b(i, j)) for all i, j.

map! : (Mapping(R, R), %) -> % if % has shallowlyMutable
from HomogeneousAggregate(R)
matrix : List(List(R)) -> %

matrix(l) converts the list of lists l to a matrix, where the list of lists is viewed as a list of the rows of the matrix.

max : % -> R if R has OrderedSet
from HomogeneousAggregate(R)
max : (Mapping(Boolean, R, R), %) -> R
from HomogeneousAggregate(R)
maxColIndex : % -> Integer

maxColIndex(m) returns the index of the 'last' column of the matrix m.

maxRowIndex : % -> Integer

maxRowIndex(m) returns the index of the 'last' row of the matrix m.

member? : (R, %) -> Boolean
from HomogeneousAggregate(R)
members : % -> List(R)
from HomogeneousAggregate(R)
min : % -> R if R has OrderedSet
from HomogeneousAggregate(R)
minColIndex : % -> Integer

minColIndex(m) returns the index of the 'first' column of the matrix m.

minRowIndex : % -> Integer

minRowIndex(m) returns the index of the 'first' row of the matrix m.

more? : (%, NonNegativeInteger) -> Boolean
from Aggregate
ncols : % -> NonNegativeInteger

ncols(m) returns the number of columns in the matrix m.

nrows : % -> NonNegativeInteger

nrows(m) returns the number of rows in the matrix m.

nullSpace : % -> List(Col) if R has IntegralDomain

nullSpace(m)+ returns a basis for the null space of the matrix m.

nullity : % -> NonNegativeInteger if R has IntegralDomain

nullity(m) returns the nullity of the matrix m. This is the dimension of the null space of the matrix m.

opposite? : (%, %) -> Boolean
from AbelianMonoid
parts : % -> List(R)
from HomogeneousAggregate(R)
qelt : (%, Integer, Integer) -> R

qelt(m, i, j) returns the element in the ith row and jth column of the matrix m. Note: there is NO error check to determine if indices are in the proper ranges.

random : () -> % if R has Finite
from Finite
rank : % -> NonNegativeInteger if R has IntegralDomain

rank(m) returns the rank of the matrix m.

row : (%, Integer) -> Row

row(m, i) returns the ith row of the matrix m. Error: if the index is outside the proper range.

rowEchelon : % -> % if R has EuclideanDomain

rowEchelon(m) returns the row echelon form of the matrix m.

sample : () -> %
from AbelianMonoid
size : () -> NonNegativeInteger if R has Finite
from Finite
size? : (%, NonNegativeInteger) -> Boolean
from Aggregate
smaller? : (%, %) -> Boolean if R has Finite
from Comparable
square? : % -> Boolean

square?(m) returns true if m is a square matrix (i.e. if m has the same number of rows as columns) and false otherwise.

subtractIfCan : (%, %) -> Union(%, "failed") if R has AbelianGroup
from CancellationAbelianMonoid
symmetric? : % -> Boolean

symmetric?(m) returns true if the matrix m is square and symmetric (i.e. m[i, j] = m[j, i] for all i and j) and false otherwise.

zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

Comparable

ConvertibleTo(InputForm)

Aggregate

BiModule(R, R)

CancellationAbelianMonoid

LeftModule(R)

Finite

SetCategory

CoercibleTo(OutputForm)

InnerEvalable(R, R)

AbelianGroup

AbelianSemiGroup

Hashable

RightModule(R)

finiteAggregate

Module(R)

Evalable(R)

AbelianMonoid

HomogeneousAggregate(R)

BasicType