Algorithms for programmers phần 2

Với đầu vào thực tế, người ta do đó có hiệu quả tách h (0) và h (1). Lưu ý rằng một khi đã có thói quen cho cả hai chu kỳ và Hơn nữa, chúng ta cần quan niệm của Z / MZ *, chiếc nhẫn của các đơn vị trong Z / MZ. Z / MZ * chứa tất cả các yếu tố nghịch (đơn vị) của Z / MZ, | CHAPTER 1. THE FOURIER TRANSFORM 23 a j e cc1 cos a ss1 sin a cc3 cos 3 a 4 cc1 cc1 ss3 sin 3 a 4 ss1 ss1 ix j id 2 n2 while ix n-1 10 ix while i0 n i2 i3 i0 i2 n4 n4 n4 x i0 r1 x i0 x i2 x i0 - x i2 x i1 r2 x i1 x i3 x i1 - x i3 y i0 s1 y i0 y i2 y i0 - y i2 y i1 s2 y i1 y i3 y i1 - y i3 r1 s3 r1 s2 r1-s2 r2 s2 r2 s1 r2-s1 complex mult x i2 y i2 - s2 r1 ss1 cc1 x i2 r1 cc1 - s2 ss1 y i2 -s2 cc1 - r1 ss1 complex mult y i3 x i3 r2 s3 cc3 ss3 x i3 s3 cc3 r2 ss3 y i3 r2 cc3 - s3 ss3 i0 i0 id ix 2 id - n2 j id 4 id ix 1 id 4 while ix n for i0 ix-1 to n-id step id i1 i0 1 x i0 x i1 x i0 x i1 x i0 -x i1 y i0 y i1 y i0 y i1 y i0 -y i1 ix id 2 id - 1 4 id revbin_permute x n revbin_permute y n if is 0 for j 1 to n 2-1 swap x j x n-j swap y j y n-j source file FXT split_radix_fft in fft FXT split_radix_fft in fft Inverse FFT for free Suppose you programmed some FFT algorithm just for one value of is the sign in the exponent. There is a nice trick that gives the inverse transform for free if your implementation uses seperate arrays for CHAPTER 1. THE FOURIER TRANSFORM 24 real and imaginary part of the complex sequences to be transformed. If your procedure is something like procedure my_fft ar ai Idn only for is 1 real ar ldn-1 input result real part real ai ldn-1 input result imaginary part incredibly complicated code that you can t see how to modify for is -1 Then you don t need to modify this procedure at all in order to get the inverse transform. If you want the inverse transform somewhere then just instead of my_fft ar ai ldn forward fft type my_fft ai ar ldn backward fft Note the swapped real- and imaginary parts The same trick works if your procedure coded for fixed is 1. To see why this works we first note that F a ib F as ÍƠ F oa i F bs Ơ F 6 a F as i F bs iơ F M i F bA and the computation with swapped real- and imaginary parts gives F b ia F bs i F as iơ F 6a i F aA . .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.