conv_cpp: Convolution (in C++)
Description
Performs 1D convolution of two vectors in C++ via FFT.
Usage
conv_cpp(a, b, shape = "full")
Value
A numeric vector containing the convolution result.
Arguments
- a
The first numeric vector.
- b
The second numeric vector.
- shape
(optional) The shape of the output: "full", "same", or "valid". Default is "full," matching conv and the Armadillo default, which means that the output array is length(a) + length(b) - 1.