At this moment conv convolves only two vectors, conv(u,v). If you have a list of vectors lst that you want to convolve, you can do it like this:
reduce(conv, lst)
But this is very inefficient because it computes the inverse Fourier transform too many times. A much more efficient way is to compute the FT of every vector once, multiply them element-wise, and then compute only one FT inversion of the product sequence. But for this you need a dedicated conv(u, v, w, ...) that accepts an arbitrary number of vectors.
At this moment
conv
convolves only two vectors,conv(u,v)
. If you have a list of vectorslst
that you want to convolve, you can do it like this:reduce(conv, lst)
But this is very inefficient because it computes the inverse Fourier transform too many times. A much more efficient way is to compute the FT of every vector once, multiply them element-wise, and then compute only one FT inversion of the product sequence. But for this you need a dedicated
conv(u, v, w, ...)
that accepts an arbitrary number of vectors.