TMtxInt.Copy Method

Overload List

#SignatureDescription
1TMtxInt Copy(TMtxInt 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].
2TMtxVecInt Copy(TMtxVecInt Src)Copy object values.
└ indexed: TMtxVecInt Copy(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Overload 1: TMtxInt Copy(TMtxInt 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].

#NameTypeDescription
1MtxTMtxIntsource TMtxInt
2MtxRowInt32
3MtxColInt32
4RowInt32
5ColInt32
6NrRowsInt32
7NrColsInt32
8TransposeBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is true and bounds are overrun. If Transpose is true, the matrix is transposed as well.

Overload 2: TMtxVecInt Copy(TMtxVecInt Src)

Copy object values.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt

Result: stored in self (calling object), returns self for chaining

Remarks:

Copy each of Vec elements to the calling object. The Size property of the calling object is set implicitly to match Vec object.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TMtxVecInt a,b,c;
        a = new TMtxVecInt();
        b = new TMtxVecInt();
        a.SetIt(new int[] {1,2,3,4});  // a = [1,2,3,4] i.e 1+2i ; 3+4i
        b.Copy(a);                // b = [1,2,3,4]
    }
}

Indexed: TMtxVecInt Copy(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2SrcIndexInt32source start index
3IndexInt32start index
4LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Calling vector Dew.Math.TMtxVecInt.Size must be set explicitly. An exception is raised if array borders are overrun or underrun.