TSparseMtx::ImagPart Method

Overload List

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

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

Gets the imaginary part of a complex object.

#NameTypeDescription
1VecTMtxVec *
Remarks:

Gets the imaginary part of a complex object Vec and stores the real results in the calling object. Size and TSparseMtx::Complex properties of the calling object are set implicitly to match Vec object. Vec TSparseMtx::Complex must be true otherwise the exception will be 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});  // a= [1+2i, 3+4i]
    b->ImagPart(a);  // b = [2, 4]
    FreeIt(a,b);
}
See Also: TSparseMtx::RealPart, TSparseMtx::RealToCplx
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

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

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

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

Stores the result in calling object. An exception is raised if the calling object is complex, if Vec is not complex or if array borders are overrun/underrun.

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