Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend conv to arbitrary lists of vectors #166

Open
KristofferC opened this issue Jun 25, 2017 · 1 comment
Open

Extend conv to arbitrary lists of vectors #166

KristofferC opened this issue Jun 25, 2017 · 1 comment

Comments

@KristofferC
Copy link

Moved from JuliaLang/julia#16126

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.

@martinholters
Copy link
Member

Sounds like a good idea, but we have conv(u::AbstractVector, v::AbstractVector, A::AbstractMatrix) for a 2D-convolution with separable (into u and v) convolution kernel. And we support mixing arrays of different dimensions for the two-arg cases, so that would imply a subtle different meaning for that three-arg method if we support n-arg in general.
That said, we should probably deprecate the current three-arg method to conv(u::AbstractVector, v::Transpose{<:AbstractVector}, A::AbstractMatrix) which would just be a special case of the general n-arg method to be added in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants