The current implementation of the constructor Matrix(int) creates an identity matrix, but only for
numbers, not covering the function field, where 0 and 1 are, actually, the constant functions [](...){return 0;} and [](..){return 1;}.
It's asked to modify this implementation so that the 1 and 0 elements can be specified. In other sense, this constructor is generalized to cover more types of matrices with equal elements in all positions except for the ones in the diagonal, which is filled with an specific element.
This constructor, then, becomes Matrix(int m, int n, TField a, TField b) and creates an mxn matrix with a in the diagonal and b in the other positions.
The current implementation of the constructor
Matrix(int)
creates an identity matrix, but only for numbers, not covering the function field, where 0 and 1 are, actually, the constant functions[](...){return 0;}
and[](..){return 1;}
.It's asked to modify this implementation so that the 1 and 0 elements can be specified. In other sense, this constructor is generalized to cover more types of matrices with equal elements in all positions except for the ones in the diagonal, which is filled with an specific element.
This constructor, then, becomes
Matrix(int m, int n, TField a, TField b)
and creates anmxn
matrix witha
in the diagonal andb
in the other positions.