TMtxByte.Eye Method

TMtxInt Eye(Int32 ARows, Int32 ACols, TIntPrecision aIntPrecision)

Constructs an eye matrix.

#NameTypeDescription
1ARowsInt32
2AColsInt32
3aIntPrecisionTIntPrecision

Result: stored in self (calling object), returns self for chaining

Remarks:

Construct an eye matrix with ones only on main diagonal and zeros elsewhere. The number of Rows and columns of an eye matrix are set by ARows and ACols parameters. The Dew.Math.TMtxVecInt.IntPrecision property of an eye matrix is set by aIntPrecision parameter.

Examples
TMtxInt A;
TMtxInt B;
MtxVec.CreateIt(out A);
try
    {
        A.Eye(3,3);
        // ...
    }
finally
    {
        MtxVec.FreeIt(ref A);
    }