pub fn fourier_integral(
f: fn(f64) -> Complex<f64>,
x_start: f64,
x_stop: f64,
omega_start: f64,
omega_stop: f64,
m: usize,
direction: FourierDirection,
) -> Result<FourierIntegralResult, ErrorsJSL>Expand description
Approximate the Fourier integral of f over its finite support.
M is both the number of equally spaced samples used to approximate the
integral on [x_start, x_stop] and the number of equally spaced output
frequencies on [omega_start, omega_stop]. For M == 1, the sole
frequency is omega_start and the function is sampled at the midpoint of
its support. For larger M, the support endpoints are included and the
trapezoidal rule is used.
The frequency-domain evaluation uses the chirp-z transform, which is
implemented through FFT convolution with Fft. This permits arbitrary
frequency ranges, not only the standard FFT bins.