Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx Copy(TMtx Mtx, Int32 MtxRow, Int32 MtxCol, Int32 Row, Int32 Col, Int32 NrRows, Int32 NrCols, Boolean Transpose) | 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]. |
| 2 | TMtxVec Copy(TMtxInt Src, TMtxFloatPrecision dstFloatPrecision) | Copy and convert values from TVecInt. |
| 3 | TMtxVec Copy(TMtxVec Vec) | Copy object values. |
| └ indexed: TMtxVec Copy(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 4 | TMtxVec Copy(TMtxVec Src, TMtxFloatPrecision dstFloatPrecision) | Copy object values. |
| 5 | TMtxVec Copy(TVecInt Src, TMtxFloatPrecision dstFloatPrecision) | Copy and convert values from TVecInt. |
| 6 | TMtxVec Copy(TMtxInt Src, Int32 SrcIndex, Int32 Index, Int32 Len) | Copy and convert values from TMtxInt at indexes [SrcIndex]...[SrcIndex+Len-1]. |
| 7 | TMtxVec Copy(TVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len) | Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1]. |
Overload 1: TMtx Copy(TMtx Mtx, Int32 MtxRow, Int32 MtxCol, Int32 Row, Int32 Col, Int32 NrRows, Int32 NrCols, Boolean Transpose)
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 | source TMtx |
| 2 | MtxRow | Int32 | |
| 3 | MtxCol | Int32 | |
| 4 | Row | Int32 | |
| 5 | Col | Int32 | |
| 6 | NrRows | Int32 | |
| 7 | NrCols | Int32 | |
| 8 | Transpose | Boolean |
Result: stored in self (calling object), returns self for chaining
An exception is raised if Dew.Math.Matrix.ConditionCheck is true and bounds are overrun. If Transpose is true, the matrix is transposed as well. An exception is raised if Dew.Math.Matrix.ConditionCheck is true and Complex properties of the calling matrix and Mtx do not match.
Overload 2: TMtxVec Copy(TMtxInt Src, TMtxFloatPrecision dstFloatPrecision)
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxInt | source 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: TMtxVec Copy(TMtxVec Vec)
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | 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 Dew.Math.Matrix.Complex properties of the calling object are set implicitly to match Vec object.
Matrix a = new Matrix();
Matrix x = new Matrix();
x.SetIt(2, 2, false, new double[] { 1.0, 2.0, 3.0, 4.0 });
a.Copy(x);
if (!a.IsEqual(x, 1e-10, TCompare.cmpAbsolute))
throw new Exception("Matrix.Copy: mismatch");
Matrix a;
Matrix b;
Matrix c;
a.SetIt(1,2,true,new double[] {1,2,3,4}); // a = new double[] {1,2,3,4}
b.Copy(a); // b = new double[] {1,2,3,4}
c.Copy(a,b); //concatenate a and b and store in c = new double[] {1,2,3,4,1,2,3,4}
Indexed: TMtxVec Copy(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len)
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 | Int32 | |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Size and Dew.Math.Matrix.Complex properties must be set explicitly. An exception is raised if Dew.Math.Matrix.ConditionCheck is True and array borders are overrun or underrun.
Overload 4: TMtxVec Copy(TMtxVec Src, TMtxFloatPrecision dstFloatPrecision)
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 Src elements to the calling object. Size and Dew.Math.Matrix.Complex properties of the calling object are set implicitly to match Src object.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TVec a,b,c;
MtxVec.CreateIt(out a, out b, out c);
try
{
a.SetIt(true,new double[] {1,2,3,4}); // a = [1,2,3,4] i.e 1+2i ; 3+4i
b.Copy(a, mvSingle); // convert to single precision
}
finally
{
MtxVec.FreeIt(ref a,ref b,ref c);
}
}
}
Overload 5: TMtxVec Copy(TVecInt Src, TMtxFloatPrecision dstFloatPrecision)
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt | source 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: TMtxVec Copy(TMtxInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)
Copy and convert values from TMtxInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxInt | source TMtxInt |
| 2 | SrcIndex | Int32 | source start index |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | 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 Dew.Math.Matrix.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.
Overload 7: TMtxVec Copy(TVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)
Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt | source TVecInt |
| 2 | SrcIndex | Int32 | source start index |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | 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 Dew.Math.Matrix.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.