Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function SetVal(const Value: Integer): TMtxInt; | Set all calling object elements to Value. |
| └ indexed: function SetVal(const Value: Integer; const Index: Integer; const Len: Integer): TMtxVecInt; | ||
| 2 | function SetVal(const Value: Integer; Row: Integer; Col: Integer; ToRow: Integer; ToCol: Integer): TMtxInt; | Initializes matrix values to Value. |
Overload 1: function SetVal(const Value: Integer): TMtxInt;
Set all calling object elements to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Integer |
Result: stored in self (calling object), returns self for chaining
Indexed: function SetVal(const Value: Integer; const Index: Integer; const Len: Integer): TMtxVecInt;
Set calling object elements [Index]..[Index+Len-1] to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Integer | |
| 2 | Index | Integer | start index |
| 3 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Remarks:
An exception is raised if array borders are overrun/underrun.
Examples
var
a: TMtxInt;
begin
MtxVecInt.CreateIt(out a);
try
a.SetIt(2,2,new int[] {1,2,3,4});
a.SetVal(5,2,2); // a = [1,1,5,5]
finally
MtxVecInt.FreeIt(ref a);
end;
end;
Overload 2: function SetVal(const Value: Integer; Row: Integer; Col: Integer; ToRow: Integer; ToCol: Integer): TMtxInt;
Initializes matrix values to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Integer | |
| 2 | Row | Integer | |
| 3 | Col | Integer | |
| 4 | ToRow | Integer | |
| 5 | ToCol | Integer |
Result: stored in self (calling object), returns self for chaining
Remarks:
Sets the calling matrix elements [Row,Col]..[ToRow,ToCol] to Value. An exception is raised if TMtxVecBase.ConditionCheck is true and array bounds are overrun.
See Also: MatrixInt.SetIt, MatrixInt.SetZero