scientific-cal 0.2.2

scientific cal
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::spectrum::{impls::{FFTImpl, IFFTImpl}, base::{FFTApply, FFTFactory, IFFTApply}};
use num_traits::{Float, FromPrimitive, Zero, One};

pub struct DefaultFFTFactory;

impl<T> FFTFactory<T> for DefaultFFTFactory
where
    T: Float + FromPrimitive + Clone + Zero + One + 'static,
{
    fn create_fft(&self) -> Box<dyn FFTApply<T>> {
        Box::new(FFTImpl)
    }

    fn create_ifft(&self) -> Box<dyn IFFTApply<T>> {
        Box::new(IFFTImpl)
    }
}