function SetIt(ARows: Integer; ACols: Integer; aPrecision: TIntPrecision; const A: TIntegerArray): TMtxInt;
Sets matrix values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Integer | |
| 2 | ACols | Integer | |
| 3 | aPrecision | TIntPrecision | |
| 4 | A | TIntegerArray |
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 TMtxInt.Rows and TMtxInt.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: TMtxInt.SetVal