Skip to main content

FftScalar

Trait FftScalar 

Source
pub trait FftScalar: TensorScalar + Sealed {
    type Complex: TensorScalar;
}
Expand description

A scalar an FFT accepts: f32, f64, Complex32 or Complex64.

Complex is the dtype of a spectrum of this scalar.

§Examples

use num_complex::Complex64;
use tenferro_fft::FftScalar;

fn spectrum_of<T: FftScalar>() -> &'static str {
    std::any::type_name::<T::Complex>()
}
assert_eq!(spectrum_of::<f64>(), std::any::type_name::<Complex64>());

Required Associated Types§

Source

type Complex: TensorScalar

The complex scalar of the spectrum.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FftScalar for Complex32

Source§

impl FftScalar for Complex64

Source§

impl FftScalar for f32

Source§

impl FftScalar for f64

Implementors§