[−][src]Trait basic_dsp::Convolution
Provides a convolution operations.
Required methods
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: C,
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
&mut self,
buffer: &mut B,
impulse_response: C,
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.
An optimized convolution algorithm is used if 1.0 / ratio
is an integer (inside a 1e-6 tolerance)
and len is smaller than a threshold (202 right now).
Failures
TransRes may report the following ErrorReason members:
VectorMustBeComplex: ifselfis in real number space overlap_discardimpulse_responseis in complex number space.VectorMustBeInTimeDomain: ifselfis in frequency domain.
Implementors
impl<'a, S, T, N, D> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for DspVec<S, T, N, D> where
D: TimeDomain,
N: ComplexNumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>,
DspVec<S, T, N, D>: Clone,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>, [src]
D: TimeDomain,
N: ComplexNumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>,
DspVec<S, T, N, D>: Clone,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>,
fn convolve<B>(
&mut self,
buffer: &mut B,
function: &dyn ComplexImpulseResponse<T>,
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
function: &dyn ComplexImpulseResponse<T>,
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, S, T, N, D> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for DspVec<S, T, N, D> where
D: TimeDomain,
N: NumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>,
DspVec<S, T, N, D>: Clone,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>, [src]
D: TimeDomain,
N: NumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>,
DspVec<S, T, N, D>: Clone,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<InlineVector<T>, T, N, D>, S, T, N, D>,
fn convolve<B>(
&mut self,
buffer: &mut B,
function: &dyn RealImpulseResponse<T>,
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
function: &dyn RealImpulseResponse<T>,
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix3xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix4xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for MatrixMxN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn ComplexImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for Matrix3xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for Matrix4xN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,
fn convolve<B>(
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>, [src]
&mut self,
buffer: &mut B,
impulse_response: &'a (dyn RealImpulseResponse<T> + 'a),
ratio: T,
len: usize
) where
B: for<'b> Buffer<'b, S, T>,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for MatrixMxN<V, S, T> where
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>, [src]
S: ToSliceMut<T>,
T: RealNumber,
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,