Table of Contents

Struct Cmplx

Namespace
NumSharp.Fourier
Assembly
NumSharp.dll

Port of pocketfft's cmplx<T0> for the double engine (T0 == double). The field layout (r then i) is identical to Complex (real then imaginary), so the two are bit-reinterpretable at the driver boundary. All operators reproduce pocketfft's exact real/imag operation order.

public struct Cmplx
Inherited Members

Constructors

Cmplx(double, double)

public Cmplx(double r_, double i_)

Parameters

r_ double
i_ double

Fields

i

public double i

Field Value

double

r

public double r

Field Value

double

Methods

SpecialMul(bool, in Cmplx, in Cmplx)

pocketfft special_mul<fwd> (twiddle multiply with direction-dependent conjugation). fwd: (ro.r+io.i, io.r-ro.i); bwd: (ro.r-io.i, ro.i+io.r).

public static Cmplx SpecialMul(bool fwd, in Cmplx v1, in Cmplx v2)

Parameters

fwd bool
v1 Cmplx
v2 Cmplx

Returns

Cmplx

Operators

operator +(in Cmplx, in Cmplx)

public static Cmplx operator +(in Cmplx a, in Cmplx b)

Parameters

a Cmplx
b Cmplx

Returns

Cmplx

operator *(in Cmplx, in Cmplx)

public static Cmplx operator *(in Cmplx a, in Cmplx b)

Parameters

a Cmplx
b Cmplx

Returns

Cmplx

operator *(in Cmplx, double)

public static Cmplx operator *(in Cmplx a, double s)

Parameters

a Cmplx
s double

Returns

Cmplx

operator -(in Cmplx, in Cmplx)

public static Cmplx operator -(in Cmplx a, in Cmplx b)

Parameters

a Cmplx
b Cmplx

Returns

Cmplx