VectorInt::Copy Method

Overload List

#SignatureDescription
1TMtxVecInt *Copy(TMtxVecInt *Src) const;Copy object values.
2TMtxVecInt *Copy(TMtxVecInt *Src, const int SrcIndex, const int Index, const int Len) const;Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

Overload 1: TMtxVecInt *Copy(TMtxVecInt *Src) const;

Copy object values.

#NameTypeDescription
1SrcTMtxVecInt *
Remarks:

Copy each of Vec elements to the calling object. Size and precision properties of the calling object are set implicitly to match Vec object.

Examples
#include "MtxVecInt.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    TVecInt *a, *b, *c;
    a = new TVecInt();
    b = new TVecInt();
    a->SetIt(DewArray<int>{1,2,3,4});  // a = [1,2,3,4]
    b->Copy(a);                // b = [1,2,3,4]
    delete a;
    delete b;
}
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 2: TMtxVecInt *Copy(TMtxVecInt *Src, const int SrcIndex, const int Index, const int Len) const;

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

#NameTypeDescription
1SrcTMtxVecInt *
2SrcIndexconst int
3Indexconst int
4Lenconst int
Remarks:

Vector VectorInt::Size must be set explicitly. An exception is raised if array borders are overrun or underrun.

Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler