#fft #numerics #dsp #mathematics

chfft

Fastest Fourier Transform library implemented with pure Rust

9 releases

✓ Uses Rust 2018 edition

new 0.3.1 Sep 9, 2019
0.3.0 Sep 9, 2019
0.2.4 May 26, 2018
0.2.3 Mar 23, 2018
0.1.1 Aug 31, 2017

#45 in Math

Download history 13/week @ 2019-05-27 9/week @ 2019-06-03 29/week @ 2019-06-10 26/week @ 2019-06-17 125/week @ 2019-06-24 21/week @ 2019-07-01 37/week @ 2019-07-08 1/week @ 2019-07-15 14/week @ 2019-07-22 5/week @ 2019-07-29 8/week @ 2019-08-05 3/week @ 2019-08-12 30/week @ 2019-08-19 27/week @ 2019-08-26 33/week @ 2019-09-02

121 downloads per month
Used in 1 crate

MPL-2.0 license

99KB
2K SLoC

chfft

crates.io badge Build Status docs.rs Coverage Status

Fastest Fourier Transform library implemented with pure Rust.

How-to Use

See the crate documentation for more details.

Features

  • CFft1D - Perform a complex-to-complex one-dimensional Fourier transform.

  • CFft2D - Perform a complex-to-complex two-dimensional Fourier transform.

  • Dct1D - Perform a discrete cosine transform.

  • RFft1D - Perform a real-to-complex one-dimensional Fourier transform.

  • Mdct1D - Perform a Modified discrete cosine transform.

Examples

extern crate chfft;
extern crate num_complex;
use num_complex::Complex;
use chfft::CFft1D;

fn main() {
    let input = [Complex::new(2.0, 0.0), Complex::new(1.0, 1.0),
                 Complex::new(0.0, 3.0), Complex::new(2.0, 4.0)];
    let mut fft = CFft1D::<f64>::with_len(input.len());
    let output = fft.forward(&input);
    println!("the transform of {:?} is {:?}", input, output);
}

Dependencies

~225KB