TMtxInt.SetIt Method

TMtxInt SetIt(Int32 ARows, Int32 ACols, TIntPrecision aPrecision, Int32[] A)

Sets matrix values.

#NameTypeDescription
1ARowsInt32
2AColsInt32
3aPrecisionTIntPrecision
4AInt32[]

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

Remarks:

Sets matrix values. This method gives you the possibility to pass large arrays of elements without having to declare constant arrays.

Pass all elements in A array to the calling matrix. The Dew.Math.TMtxInt.Rows and Dew.Math.TMtxInt.Cols properties of the calling matrix are set to ARows and ACols and the Dew.Math.TMtxVecInt.IntPrecision property is set to aPrecision. An exception is raised if the matrix size (ARows*ACols) does not match the number of integer numbers in A.

Examples
TMtxInt A;
MtxVec.CreateIt(out A);
try
    {
        A.SetIt(2,2,[1,2,
        2,4]);
    }
finally
    {
        MtxVec.FreeIt(ref A);
    }
See Also: TMtxInt.SetVal