Trait basic_dsp::conv_types::RealImpulseResponse

source ·
pub trait RealImpulseResponse<T>: Sync
where T: RealNumber,
{ // Required methods fn is_symmetric(&self) -> bool; fn calc(&self, x: T) -> T; }
Expand description

A convolution function in time domain and real number space

Required Methods§

source

fn is_symmetric(&self) -> bool

Indicates whether this function is symmetric around 0 or not. Symmetry is defined as self.calc(x) == self.calc(-x).

source

fn calc(&self, x: T) -> T

Calculates the convolution for a data point

Trait Implementations§

source§

impl<'a, S, T, N, D> Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>> for DspVec<S, T, N, D>
where S: ToSliceMut<T>, T: RealNumber, N: NumberSpace, D: TimeDomain, DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T> + Clone + ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>,

source§

fn convolve<B>( &mut self, buffer: &mut B, function: &dyn RealImpulseResponse<T>, ratio: T, len: usize )
where B: for<'b> Buffer<'b, S, T>,

Convolves self with the convolution function impulse_response. For performance consider to to use FrequencyMultiplication instead of this operation depending on len. Read more
source§

impl<'a, V, S, T> Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>> for Matrix2xN<V, S, T>
where V: Vector<T> + Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>>, S: ToSliceMut<T>, T: RealNumber,

source§

fn convolve<B>( &mut self, buffer: &mut B, impulse_response: &'a dyn RealImpulseResponse<T>, ratio: T, len: usize )
where B: for<'b> Buffer<'b, S, T>,

Convolves self with the convolution function impulse_response. For performance consider to to use FrequencyMultiplication instead of this operation depending on len. Read more
source§

impl<'a, V, S, T> Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>> for Matrix3xN<V, S, T>
where V: Vector<T> + Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>>, S: ToSliceMut<T>, T: RealNumber,

source§

fn convolve<B>( &mut self, buffer: &mut B, impulse_response: &'a dyn RealImpulseResponse<T>, ratio: T, len: usize )
where B: for<'b> Buffer<'b, S, T>,

Convolves self with the convolution function impulse_response. For performance consider to to use FrequencyMultiplication instead of this operation depending on len. Read more
source§

impl<'a, V, S, T> Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>> for Matrix4xN<V, S, T>
where V: Vector<T> + Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>>, S: ToSliceMut<T>, T: RealNumber,

source§

fn convolve<B>( &mut self, buffer: &mut B, impulse_response: &'a dyn RealImpulseResponse<T>, ratio: T, len: usize )
where B: for<'b> Buffer<'b, S, T>,

Convolves self with the convolution function impulse_response. For performance consider to to use FrequencyMultiplication instead of this operation depending on len. Read more
source§

impl<'a, V, S, T> Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>> for MatrixMxN<V, S, T>
where V: Vector<T> + Convolution<'a, S, T, &'a dyn RealImpulseResponse<T>>, S: ToSliceMut<T>, T: RealNumber,

source§

fn convolve<B>( &mut self, buffer: &mut B, impulse_response: &'a dyn RealImpulseResponse<T>, ratio: T, len: usize )
where B: for<'b> Buffer<'b, S, T>,

Convolves self with the convolution function impulse_response. For performance consider to to use FrequencyMultiplication instead of this operation depending on len. Read more

Implementors§