Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void CopyMtx(TMtx Mtx) | Copy values from matrix. |
| 2 | TVec CopyMtx(TMtx Mtx, Int32 Index, Int32 Row, Int32 Col, Int32 Len) | Desc Copy Mtx elements Values1D[Row*fCols+Col]..Values1D[Row*fCols+Col+Len] in the calling vector elements [Index]..[Index+Len-1]. |
Overload 1: void CopyMtx(TMtx Mtx)
Copy values from matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtx | source TMtx |
Result: stored in self (calling object)
Copy each of Mtx Dew.Math.TMtx elements to the calling vector. The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of the calling vector are set implicitly to match Mtx matrix. The same can be achieved by calling the Dew.Math.TVec.Copy method.
TVec b;
TVec c;
TMtx A;
MtxVec.CreateIt(out b, out c);
MtxVec.CreateIt(out A);
try
{
a.SetIt(2,2,false,new double[] {1,2,3,4});
b.CopyMtx(a); // b = new double[] {1,2,3,4}
}
finally
{
MtxVec.FreeIt(ref A);
MtxVec.FreeIt(ref b, ref c);
}
Overload 2: TVec CopyMtx(TMtx Mtx, Int32 Index, Int32 Row, Int32 Col, Int32 Len)
Desc Copy Mtx elements Values1D[Row*fCols+Col]..Values1D[Row*fCols+Col+Len] in the calling vector elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtx | source TMtx |
| 2 | Index | Int32 | start index |
| 3 | Row | Int32 | |
| 4 | Col | Int32 | |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties must be set explicitly. An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is True and array borders are overrun or underrun. The same can be achieved by calling the Copy method.