TSparseMtx.RealToCplx Method

Overload List

#SignatureDescription
1TMtxVec RealToCplx(TMtxVec ReVec, TMtxVec ImVec)Constructs a complex object from two real objects.
2TMtxVec RealToCplx(TMtxVec ReVec, TMtxVec ImVec, Int32 ReIndex, Int32 ImIndex, Int32 Index, Int32 Len)Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

Overload 1: TMtxVec RealToCplx(TMtxVec ReVec, TMtxVec ImVec)

Constructs a complex object from two real objects.

#NameTypeDescription
1ReVecTMtxVecsource TVec or TMtx
2ImVecTMtxVecsource TVec or TMtx

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

Remarks:

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The results are stored in the calling object. Size and Dew.Math.TMtxVec.Complex properties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec Dew.Math.TMtxVec.Complex property is True.

Examples
Matrix a;
Matrix b;
Matrix c;
a.SetIt(1,2,true,new double[] {1,2,3,4});
b.SetIt(1,2,true,new double[] {2,2,3,4});
c.RealToCplx(a,b);

Overload 2: TMtxVec RealToCplx(TMtxVec ReVec, TMtxVec ImVec, Int32 ReIndex, Int32 ImIndex, Int32 Index, Int32 Len)

Construct a complex object from the ReVec elements [ReIndex]..[ReIndex+Len-1] (real part) and the ImVec elements [ImIndex]..[ImIndex+Len-1] (imaginary part).

#NameTypeDescription
1ReVecTMtxVecsource TVec or TMtx
2ImVecTMtxVecsource TVec or TMtx
3ReIndexInt32
4ImIndexInt32
5IndexInt32start index
6LenInt32element count

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

Remarks:

The results are stored to calling object elements [Index]..[Index+Len-1]. Size and Dew.Math.TMtxVec.Complex properties of the calling object must be set explicitly. An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is True and array borders are overrun. An exception is also raised if ReVec or ImVec Dew.Math.TMtxVec.Complex property is True.