Trait basic_dsp_vector::window_functions::WindowFunction
[−]
[src]
pub trait WindowFunction<T>: Sync where T: RealNumber { fn is_symmetric(&self) -> bool; fn window(&self, n: usize, length: usize) -> T; }
A window function for FFT windows. See https://en.wikipedia.org/wiki/Window_function
for details. Window functions should document if they aren't applicable for
Inverse Fourier Transformations.
The contract for window functions is as follows:
- The second argument is of the function is always
self.points()
and the possible values for the first argument ranges from0..self.points()
. - A window function must be symmetric about the y-axis.
- All real return values are allowed
Required Methods
fn is_symmetric(&self) -> bool
Indicates whether this function is symmetric around 0 or not.
Symmetry is defined as self.window(x) == self.window(-x)
.
fn window(&self, n: usize, length: usize) -> T
Calculates a point of the window function
Implementors
impl<T> WindowFunction<T> for TriangularWindow where T: RealNumber
impl<T> WindowFunction<T> for HammingWindow<T> where T: RealNumber
impl<T> WindowFunction<T> for ForeignWindowFunction<T> where T: RealNumber