Trait basic_dsp::conv_types::ComplexImpulseResponse
source · [−]pub trait ComplexImpulseResponse<T>: Syncwhere
T: RealNumber,{
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
sourceimpl<'a, S, T, N, D> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> 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> + 'a)> 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>,
sourcefn 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 moresourceimpl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn 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>,
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>,
Convolves
self
with the convolution function impulse_response
.
For performance consider to
to use FrequencyMultiplication
instead of this operation depending on len
. Read moresourceimpl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix3xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix3xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn 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>,
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>,
Convolves
self
with the convolution function impulse_response
.
For performance consider to
to use FrequencyMultiplication
instead of this operation depending on len
. Read moresourceimpl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix4xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for Matrix4xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn 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>,
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>,
Convolves
self
with the convolution function impulse_response
.
For performance consider to
to use FrequencyMultiplication
instead of this operation depending on len
. Read moresourceimpl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for MatrixMxN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)> for MatrixMxN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn ComplexImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn 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>,
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>,
Convolves
self
with the convolution function impulse_response
.
For performance consider to
to use FrequencyMultiplication
instead of this operation depending on len
. Read more