Trait FFT

Source
pub trait FFT: Sized + Copy {
    type F: Sized + Copy + From<Self> + Neg + Add<Output = Self::F> + Div<Output = Self::F> + Mul<Output = Self::F> + Sub<Output = Self::F>;

    const ZERO: Self;

    // Required methods
    fn get_roots(n: usize, inverse: bool) -> Vec<Self::F>;
    fn get_factor(n: usize, inverse: bool) -> Self::F;
    fn extract(f: Self::F) -> Self;
}

Required Associated Constants§

Source

const ZERO: Self

Required Associated Types§

Source

type F: Sized + Copy + From<Self> + Neg + Add<Output = Self::F> + Div<Output = Self::F> + Mul<Output = Self::F> + Sub<Output = Self::F>

Required Methods§

Source

fn get_roots(n: usize, inverse: bool) -> Vec<Self::F>

A primitive nth root of one raised to the powers 0, 1, 2, …, n/2 - 1

Source

fn get_factor(n: usize, inverse: bool) -> Self::F

1 for forward transform, 1/n for inverse transform

Source

fn extract(f: Self::F) -> Self

The inverse of Self::F::from()

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FFT for f64

Source§

const ZERO: f64 = 0f64

Source§

type F = Complex

Source§

fn get_roots(n: usize, inverse: bool) -> Vec<Self::F>

Source§

fn get_factor(n: usize, inverse: bool) -> Self::F

Source§

fn extract(f: Self::F) -> f64

Source§

impl FFT for i64

Source§

const ZERO: Self = 0i64

Source§

type F = Modulo<COMMON_PRIME>

Source§

fn get_roots(n: usize, inverse: bool) -> Vec<Self::F>

Source§

fn get_factor(n: usize, inverse: bool) -> Self::F

Source§

fn extract(f: Self::F) -> Self

Implementors§