Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec *Copy(TMtxVec *Vec) const; | Copy object values. |
| 2 | TMtxVec *Copy(TMtxVec *Src, const TMtxFloatPrecision dstFloatPrecision) const; | Copy object values. |
| 3 | TMtxVec *Copy(TMtxVec *Vec, int VecIndex, int Index, int Len) const; | Copy Vec elements [VecIndex]..[VecIndex+Len-1] in the calling object elements [Index]..[Index+Len-1]. |
| 4 | TMtxVec *Copy(TVecInt *Src, const TMtxFloatPrecision dstFloatPrecision) const; | Copy and convert values from TVecInt. |
| 5 | TMtxVec *Copy(TVecInt *Src) const; | Copy and convert values from TVecInt. |
| 6 | TMtxVec *Copy(TVecInt *Src, int SrcIndex, int Index, int Len) const; | Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1]. |
| 7 | TVec *Copy(TMtxVec *Vec1, TMtxVec *Vec2) const; | Copies values from Vec1 and Vec2 (concatenate). |
Overload 1: TMtxVec *Copy(TMtxVec *Vec) const;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec * |
Copy each of Vec elements to the calling object. Size and Vector::Complex properties of the calling object are set implicitly to match Vec object.
#include "Math387.h"
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a;
Vector x;
x.SetIt(DewArray<double>{ 1.0, 2.0, 3.0, 4.0 });
a.Copy(x);
if (!a.IsEqual(x, 1e-10, TCompare::cmpAbsolute))
throw tException("Vector.Copy: mismatch");
}
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a, b, c;
a.SetIt(true, DewArray<double>{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]
}
Overload 2: TMtxVec *Copy(TMtxVec *Src, const TMtxFloatPrecision dstFloatPrecision) const;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec * | |
| 2 | dstFloatPrecision | const TMtxFloatPrecision |
Copy each of Src elements to the calling object. Size and Vector::Complex properties of the calling object are set implicitly to match Src object.
#include "Math387.h"
#include "MtxVec.h"
#include "Units.MtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;
void Example()
{
TVec *a, *b, *c;
CreateIt(a, b, c);
a->SetIt(true,DewArray<double>{1,2,3,4}); // a = [1,2,3,4] i.e 1+2i ; 3+4i
b->Copy(a, TMtxFloatPrecision::mvSingleComplex); // convert to single precision
FreeIt(a,b,c);
}
Overload 3: TMtxVec *Copy(TMtxVec *Vec, int VecIndex, int Index, int Len) const;
Copy Vec elements [VecIndex]..[VecIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec * | |
| 2 | VecIndex | int | |
| 3 | Index | int | |
| 4 | Len | int |
Size and Vector::Complex properties must be set explicitly. An exception is raised if Vector::ConditionCheck is True and array borders are overrun or underrun.
#include "MtxExpr.h"
#include "Units.Math387.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
void Example()
{
Vector a, b, c;
a = {Cplx(1, 2), Cplx(3, 4)}; // a = [1,2,3,4]
b.Copy(a, TMtxFloatPrecision::mvSingleComplex); // convert to single precision
}
Overload 4: TMtxVec *Copy(TVecInt *Src, const TMtxFloatPrecision dstFloatPrecision) const;
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt * | |
| 2 | dstFloatPrecision | const TMtxFloatPrecision |
Applies appropriate conversion and copy data from TVecInt.
#include "MtxExpr.h"
#include "Units.Math387.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
void Example()
{
Vector a, b, c;
a = {Cplx(1, 2), Cplx(3, 4)};
b.Copy(a);
c.Copy(a, b); //concatenate a and b and store in c
// c = [1,2,3,4,1,2,3,4]
}
Overload 5: TMtxVec *Copy(TVecInt *Src) const;
Copy and convert values from TVecInt.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt * |
Applies appropriate conversion and copy data from TVecInt. Existing value of FloatPrecision is preserved.
Overload 6: TMtxVec *Copy(TVecInt *Src, int SrcIndex, int Index, int Len) const;
Copy and convert values from TVecInt at indexes [SrcIndex]...[SrcIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVecInt * | |
| 2 | SrcIndex | int | |
| 3 | Index | int | |
| 4 | Len | int |
Applies appropriate conversion and copy data from TVecInt. The results are stored in calling object elements [Index]...[Index+Len-1]. Size and Vector::Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.
Overload 7: TVec *Copy(TMtxVec *Vec1, TMtxVec *Vec2) const;
Copies values from Vec1 and Vec2 (concatenate).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec1 | TMtxVec * | |
| 2 | Vec2 | TMtxVec * |
Copy each of Vec1 and Vec2 elements to the calling vector (concatenate). The Vector::Length and Vector::Complex properties of the calling vector are set implicitly to match Vec1 and Vec2 vector.
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a, b, c;
a.SetIt(true, DewArray<double>{1, 2, 3, 4});
b.Copy(a);
c.Copy(a, b); //concatenate a and b and store in c
// c = [1,2,3,4,1,2,3,4]
}