MatrixInt.SetIt Method

Overload List

#SignatureDescription
1function SetIt(const Rows: Integer; const Cols: Integer; aPrecision: TIntPrecision; const A: TIntegerArray): TMtxInt;Sets matrix values.
2function SetIt(const Rows: Integer; const Cols: Integer; const A: TIntegerArray): TMtxInt;Sets object values.

Overload 1: function SetIt(const Rows: Integer; const Cols: Integer; aPrecision: TIntPrecision; const A: TIntegerArray): TMtxInt;

Sets matrix values.

#NameTypeDescription
1RowsInteger
2ColsInteger
3aPrecisionTIntPrecision
4ATIntegerArray

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

Remarks:

Pass all elements in A array to the calling matrix. The MatrixInt.Rows and MatrixInt.Cols properties of the calling matrix are set to ARows and ACols and the 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
var  A: TMtxInt;
begin
    CreateIt(A);
    try
        A.SetIt(2,2,[1,2,
            2,4]);
    finally
        FreeIt(A);
    end;
end;
See Also: MatrixInt.SetVal

Overload 2: function SetIt(const Rows: Integer; const Cols: Integer; const A: TIntegerArray): TMtxInt;

Sets object values.

#NameTypeDescription
1RowsInteger
2ColsInteger
3ATIntegerArray

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.