You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
508 B

9 years ago
9 years ago
  1. //! [Algorithm][1] to compute the [discrete Fourier transform][2] and its
  2. //! inverse.
  3. //!
  4. //! [1]: https://en.wikipedia.org/wiki/Fast_Fourier_transform
  5. //! [2]: https://en.wikipedia.org/wiki/Discrete_Fourier_transform
  6. extern crate complex as number;
  7. macro_rules! power_of_two(
  8. ($data:expr) => ({
  9. let n = $data.len();
  10. if n < 1 || n & (n - 1) != 0 {
  11. panic!("expected the number of points to be a power of two");
  12. }
  13. n
  14. });
  15. );
  16. pub mod complex;
  17. pub mod real;