Extends a real object to a complex object.
Extend the calling object to complex vector. After the calling of ExtendToComplex the imaginary part becomes the same as real part if Zeros is false. If Zeros is true the imaginary part is set to zero. The use of the in-place version of the method is discouraged because it requires 3*N copy operations, while the not-in-place version requires only 2*N copy operations.
Example 1
var a,b: TVec;
begin
CreateIt(a,b);
try
a.SetIt(False,[1,2,3,4]);
b.ExtendToComplex(a,True);
finally
FreeIt(a,b);
end;
end;
Declaration
Function ExtendToComplex(Src: TMtxVec; Zeros: Boolean): TMtxVec;
Description
Extend Vec object to complex calling object. If Zeros is true then the calling vector imaginary part is set to zero, otherwise the calling object imaginary part is the same as calling object real part.
Declaration
Function ExtendToComplex(Src: TMtxVec; Zeros: Boolean; SrcIndex, DstIndex, Len: integer): TMtxVec;
Summary
Converts the source to complex.
Description
Converts the source to complex by setting the imaginary part to either zero (zeros = True) or same as real (zeros = false). Does not set size of the calling vector. If there is not sufficient space available to store the result an exception will be raised.