RectangularMatrixCategoryFunctions2(m, n, R1, Row1, Col1, M1, R2, Row2, Col2, M2)ΒΆ
matfuns.spad line 344 [edit on github]
R1: Join(SemiRng, AbelianMonoid)
Row1: DirectProductCategory(n, R1)
Col1: DirectProductCategory(m, R1)
M1: RectangularMatrixCategory(m, n, R1, Row1, Col1)
R2: Join(SemiRng, AbelianMonoid)
Row2: DirectProductCategory(n, R2)
Col2: DirectProductCategory(m, R2)
M2: RectangularMatrixCategory(m, n, R2, Row2, Col2)
RectangularMatrixCategoryFunctions2 provides functions between two matrix domains. The functions provided are map and reduce.
- map: (R1 -> R2, M1) -> M2
map(f, m)
applies the functionf
to the elements of the matrixm
.
- reduce: ((R1, R2) -> R2, M1, R2) -> R2
reduce(f, m, r)
returns a matrixn
wheren[i, j] = f(m[i, j], r)
for all indices spad{i
} andj
.