basic_dsp 0.7.0

Digital signal processing based on real or complex vectors in time or frequency domain. Vectors come with basic arithmetic, convolution, Fourier transformation and interpolation operations. The vectors are optimized for sizes of a couple of thousand elements or more. The same operations are provdided for matrices. For complete matrix algebra this lib is intended to be used in combination with other matrix libs. Please refer to the documentation for more information about this.
Documentation
extern crate basic_dsp;
use basic_dsp::conv_types::*;
use basic_dsp::*;

struct Identity;

impl RealImpulseResponse<f64> for Identity {
    fn is_symmetric(&self) -> bool {
        true
    }

    fn calc(&self, x: f64) -> f64 {
        if x == 0.0 {
            1.0
        } else {
            0.0
        }
    }
}

/// This example is just supposed to make the syntax clearer on how to implement one
/// of the traits which are indended to be extended by users as required:
/// `RealImpulseResponse`, `RealFrequencyResponse`, `ComplexImpulseResponse`, `ComplexFrequencyResponse`
/// and `WindowFunction`.
fn main() {
    let number_of_symbols = 100;
    // for this example the data doesn't really matter
    let mut data = vec![0.0; number_of_symbols].to_real_time_vec();
    let mut buffer = SingleBuffer::new();
    data.convolve(&mut buffer, &Identity, 1.0, 12);
}