MatrixInt.SetIt Method

Overload List

#SignatureDescription
1TMtxInt SetIt(Int32 Rows, Int32 Cols, TIntPrecision aPrecision, Int32[] A)Sets matrix values.
2TMtxInt SetIt(Int32 Rows, Int32 Cols, Int32[] A)Sets object values.

Overload 1: TMtxInt SetIt(Int32 Rows, Int32 Cols, TIntPrecision aPrecision, Int32[] A)

Sets matrix values.

#NameTypeDescription
1RowsInt32
2ColsInt32
3aPrecisionTIntPrecision
4AInt32[]

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

Remarks:

Pass all elements in A array to the calling matrix. The Dew.Math.MatrixInt.Rows and Dew.Math.MatrixInt.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: MatrixInt.SetVal

Overload 2: TMtxInt SetIt(Int32 Rows, Int32 Cols, Int32[] A)

Sets object values.

#NameTypeDescription
1RowsInt32
2ColsInt32
3AInt32[]

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

Remarks:

Set object values. Method call does not change object's size, but it does check for array overrun. The elements of A array are copied to the calling object elements, starting at Index. The IntPrecision property of the calling object is not changed.