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

FFT converts vector to [[Complex]] #12

Open
jcollard opened this issue Oct 9, 2014 · 0 comments
Open

FFT converts vector to [[Complex]] #12

jcollard opened this issue Oct 9, 2014 · 0 comments
Assignees

Comments

@jcollard
Copy link
Owner

jcollard commented Oct 9, 2014

This has awful run time implications:

fft' :: FFT a -> Int -> Int -> Vector a -> Vector a
fft' range rows cols orig = if check then fromRows rows' else err where
check = and . map isPowerOfTwo $ [rows, cols]
err = error "FFT can only be applied to images with dimensions 2^k x 2^j where k and j are integers."
(fromColumns -> cols') = map (fftc range rows cols 0 (rows-1) orig) [0..cols-1] -- FFT on each col
rows' = map (fftr range cols 0 (cols-1) cols') [0..rows-1] -- FFT on each row

@spatel11 spatel11 self-assigned this Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants