nzmath.matrix | (Japanese)

MatrixRing

The class is for rings of matrices. It is a subclass of ring.Ring.

Constructor

MatrixRing(size, scalars)

Create a ring of matrices with given size and ring of scalars.

Methods

unitMatrix()

Return the unit matrix.

getInstance(cls, size, scalars)

Return an instance of MatrixRing of given size and ring of scalars. The merit of using the method instead of the constructor is that the instances created by the method are cached and reused for efficiency.
This is a class method. A method call looks like:

MatrixRing.getInstance(3, rational.theIntegerRing)

then, it returns the cached instance or a newly created instance.

Properties