This function creates a block matrix with the block sizes (and degrees) determined by the modules in tarList and srcList. Each entry in the mats matrix indicates what should be placed at that block of the matrix: mats#r#c corresponds to a matrix with target tarList#r, and source srcList#c.
Each entry can be: random (giving a block which is random), the number 0 (a zero block), the number 1 (an identity block), or an actual matrix.
i1 : S = ZZ/101[a..d] o1 = S o1 : PolynomialRing |
i2 : randomBlockMatrix({S^3, S^1}, {S^3, S^1}, {{random, random}, {0, 1}}) o2 = | 24 -29 -10 -22 | | -36 19 -29 -29 | | -30 19 -8 -24 | | 0 0 0 1 | 4 4 o2 : Matrix S <--- S |
i3 : S = ZZ/101[a..d] o3 = S o3 : PolynomialRing |
i4 : randomBlockMatrix({S^3, S^2}, {S^3, S^2, S^{2:-1}}, {{random, random, 0}, {0, 1, random}}) o4 = | -38 21 -47 -13 -28 0 0 | | -16 34 -39 -43 -47 0 0 | | 39 19 -18 -15 38 0 0 | | 0 0 0 1 0 2a+16b+22c+45d 19a-16b+7c+15d | | 0 0 0 0 1 -34a-48b-47c+47d -23a+39b+43c-17d | 5 7 o4 : Matrix S <--- S |
The object randomBlockMatrix is a method function.