TVec::RealPart Method

Overload List

#SignatureDescription
1TMtxVec *RealPart(TMtxVec *Vec);Gets real part of complex object values.
2TMtxVec *RealPart(TMtxVec *Vec, int VecIndex, int Index, int Len);Gets the real part of a Vec object complex elements [VecIndex]..[VecIndex+Len-1].

Overload 1: TMtxVec *RealPart(TMtxVec *Vec);

Gets real part of complex object values.

#NameTypeDescription
1VecTMtxVec *
Remarks:

The method method gets the real part of a complex object Vec and stores the real results in the calling object. Size and TVec::Complex properties of the calling object are set implicitly to match Vec object. Vec TVec::Complex property must be true otherwise an exception is raised.

Examples
#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;

    CreateIt(a, b);
    a->SetIt(true, DewArray<double>{1, 2, 3, 4}); // = [1+2i, 3+4i]
    b->RealPart(a); // b = [1,3]
    FreeIt(a, b);
}
See Also: TVec::ImagPart
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 2: TMtxVec *RealPart(TMtxVec *Vec, int VecIndex, int Index, int Len);

Gets the real part of a Vec object complex elements [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1VecTMtxVec *
2VecIndexint
3Indexint
4Lenint
Remarks:

Stores the results in calling object real elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun or underrun or if Vec object TVec::Complex propety is false.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler