conv
-
constexpr Complex conv(Complex (*f)(Complex), Complex (*g)(Complex), const Complex &z) noexcept
Performs the convolution operation [1] on two complex functions.
Parameters
Returns
- type Complex
A complex number.
The convolution operation performs the following integral transform on two functions \(f\) and \(g\):
\[(f * g)(t) = \int_{-\infty}^{\infty}f(\tau)g(t - \tau)d\tau\]
Example
auto f = [](Complex t) { return exp(-t * t); };
auto g = [](Complex t) { return exp(-t * t); };
Complex z = 1;
std::cout << conv(f, g, z) << "\n";
Output:
0.760276 + 0j
References