Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure Copy(const Src: TSparseMtx; StripZeros: Boolean); | Copies sparse matrix from Src to the calling object. |
| 2 | function Copy(const Src: TMtxVec): TMtxVec; | Copy object values. |
| └ indexed: function Copy(const Vec: TMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | ||
| 3 | function Copy(const Src: TMtxVec; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec; | Copy object values. |
| 4 | function Copy(const Src: TMtxVecInt; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec; | Copy and convert values from TVecInt. |
| 5 | function Copy(const Src: TMtxVecInt; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1]. |
Overload 1: procedure Copy(const Src: TSparseMtx; StripZeros: Boolean);
Copies sparse matrix from Src to the calling object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TSparseMtx | |
| 2 | StripZeros | Boolean |
Result: stored in self (calling object)
Overload 2: function Copy(const Src: TMtxVec): TMtxVec;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
Copy each of Vec elements to the calling object. Size and TMtxVec.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 | source TVec or TMtx |
| 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 TMtxVec.Complex properties must be set explicitly. An exception is raised if TMtxVecBase.ConditionCheck is True and array borders are overrun or underrun.
Overload 3: function Copy(const Src: TMtxVec; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
| 2 | dstFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Copy each of Vec elements to the calling object. Size and TMtxVec.Complex properties of the calling object are set implicitly to match Vec 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 4: function Copy(const Src: TMtxVecInt; const dstFloatPrecision: TMtxFloatPrecision): TMtxVec;
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | dstFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Applies appropriate conversion and copy data from TVecInt. The destinaton data format is determined with dstFloatPrecision.
Overload 5: function Copy(const Src: TMtxVecInt; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or 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 TVecInt. The results are stored in calling object elements [Index]...[Index+Len-1]. Size and TMtxVec.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.