pub trait ComplexImpulseResponse<T>: Syncwhere
T: RealNumber,{
// Required methods
fn is_symmetric(&self) -> bool;
fn calc(&self, x: T) -> Complex<T>;
}
Expand description
A convolution function in time domain and complex number space
Required Methods§
sourcefn is_symmetric(&self) -> bool
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)
.
Trait Implementations§
source§impl<'a, S, T, N, D> Convolution<'a, S, T, &'a dyn ComplexImpulseResponse<T>> for DspVec<S, T, N, D>where
S: ToSliceMut<T>,
T: RealNumber,
N: ComplexNumberSpace,
D: TimeDomain,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T> + Clone + ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>,
impl<'a, S, T, N, D> Convolution<'a, S, T, &'a dyn ComplexImpulseResponse<T>> for DspVec<S, T, N, D>where
S: ToSliceMut<T>,
T: RealNumber,
N: ComplexNumberSpace,
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 ComplexImpulseResponse<T>,
ratio: T,
len: usize
)where
B: for<'b> Buffer<'b, S, T>,
fn convolve<B>(
&mut self,
buffer: &mut B,
function: &dyn ComplexImpulseResponse<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