Overload List
Overload 1: function Copy(const Mtx: TMtx; MtxRow: Integer; MtxCol: Integer; Row: Integer; Col: Integer; NrRows: Integer; NrCols: Integer; Transpose: Boolean): TMtx;
Copy the Mtx elements [MtxRow,MtxCol]..[MtxRow+NrRows-1,MtxCol+NrCols-1] to the calling matrix elements [Row,Col],,[Row+NrRows-1,Col+NrCols-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtx | |
| 2 | MtxRow | Integer | |
| 3 | MtxCol | Integer | |
| 4 | Row | Integer | |
| 5 | Col | Integer | |
| 6 | NrRows | Integer | |
| 7 | NrCols | Integer | |
| 8 | Transpose | Boolean |
Result: stored in self (calling object), returns self for chaining
An exception is raised if Matrix.ConditionCheck is true and bounds are overrun. If Transpose is true, the matrix is transposed as well. An exception is raised if Matrix.ConditionCheck is true and Complex properties of the calling matrix and Mtx do not match.
Overload 2: function Copy(const Src: TMtxInt; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec;
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxInt | |
| 2 | dstFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Applies appropriate conversion and copy data from TVecInt. The size of the matrix must match the length of the vector or an exception will be raised.
Overload 3: function Copy(const Vec: TMtxVec): TMtxVec;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec |
Result: stored in self (calling object), returns self for chaining
Copy each of Vec elements to the calling object. Size and Matrix.Complex properties of the calling object are set implicitly to match Vec object.
var a,b,c: Matrix;
begin
a.SetIt(1,2,True,[1,2,3,4]); // a = [1,2,3,4]
b.Copy(a); // b = [1,2,3,4]
c.Copy(a,b); //concatenate a and b and store in c = [1,2,3,4,1,2,3,4]
end;
var
a, x: Matrix;
begin
x := [[1.0, 2.0], [3.0, 4.0]];
a.Copy(x);
if not a.IsEqual(x, 1e-10, TCompare.cmpAbsolute) then
raise Exception.Create('Matrix.Copy: mismatch');
end;
Indexed: function Copy(const Vec: TMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Copy Vec elements [VecIndex]..[VecIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | |
| 2 | VecIndex | Integer | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Size and Matrix.Complex properties must be set explicitly. An exception is raised if Matrix.ConditionCheck is True and array borders are overrun or underrun.
Overload 4: function Copy(const Src: TMtxVec; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | |
| 2 | dstFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Copy each of Src elements to the calling object. Size and Matrix.Complex properties of the calling object are set implicitly to match Src object.
begin
TVec a,b,c;
CreateIt(a, b, c);
try
a.SetIt(True,[1,2,3,4]); // a = [1,2,3,4] i.e 1+2i ; 3+4i
b.Copy(a, mvSingle); // convert to single precision
finally
FreeIt(a, b, c);
end;
end;
Overload 5: function Copy(const Src: TVecInt; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec;
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt | |
| 2 | dstFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Applies appropriate conversion and copy data from TVecInt. The size of the matrix must match the length of the vector or an exception will be raised.
Overload 6: function Copy(const Src: TMtxInt; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Copy and convert values from TMtxInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxInt | |
| 2 | SrcIndex | Integer | source start index |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Applies appropriate conversion and copy data from TMtxInt. The results are stored in calling object elements [Index]...[Index+Len-1]. Size and Matrix.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.
Overload 7: function Copy(const Src: TVecInt; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt | |
| 2 | SrcIndex | Integer | source start index |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Applies appropriate conversion and copy data from TVecInt. The results are stored in calling object elements [Index]...[Index+Len-1]. Size and Matrix.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.