Trait basic_dsp_vector::ConvolutionOps
[−]
[src]
pub trait ConvolutionOps<A, S, T, N, D> where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain, { fn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &A
) -> VoidResult
where
B: for<'a> Buffer<'a, S, T>; }
Provides a convolution operation for types which at some point are slice based.
Required Methods
fn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &A
) -> VoidResult where
B: for<'a> Buffer<'a, S, T>,
&mut self,
buffer: &mut B,
impulse_response: &A
) -> VoidResult where
B: for<'a> Buffer<'a, S, T>,
Convolves self
with the convolution function impulse_response
.
For performance it's recommended
to use multiply both vectors in frequency domain instead of this operation.
Upcoming shanges
With version 0.5
this method might get renamed.
Failures
TransRes may report the following ErrorReason
members:
VectorMustBeInTimeDomain
: ifself
is in frequency domain.VectorMetaDataMustAgree
: in caseself
andimpulse_response
are not in the same number space and same domain.InvalidArgumentLength
: ifself.points() < impulse_response.points()
.
Implementors
impl<S, SO, T, N, D, NO, DO> ConvolutionOps<DspVec<SO, T, NO, DO>, S, T, NO, DO> for DspVec<S, T, N, D> where
S: ToSliceMut<T>,
SO: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: TimeDomain,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T> + Clone,
DspVec<SO, T, N, D>: TimeToFrequencyDomainOperations<SO, T> + Clone,
NO: PosEq<N> + NumberSpace,
DO: TimeDomain,