pub struct Matrix2xN<V, S, T>where
T: RealNumber,
V: Vector<T>,{ /* private fields */ }
Expand description
A matrix which can hold exactly 2 vectors.
Trait Implementations
sourceimpl<S, V, T> ApproximatedOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + ApproximatedOps<T>,
T: RealNumber,
impl<S, V, T> ApproximatedOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + ApproximatedOps<T>,
T: RealNumber,
sourcefn ln_approx(&mut self)
fn ln_approx(&mut self)
Computes the principal value approximation of natural logarithm of every element in the vector. Read more
sourcefn exp_approx(&mut self)
fn exp_approx(&mut self)
Calculates the natural exponential approximation for every vector element. Read more
sourcefn sin_approx(&mut self)
fn sin_approx(&mut self)
Calculates the sine approximation of each element in radians. Read more
sourcefn cos_approx(&mut self)
fn cos_approx(&mut self)
Calculates the cosine approximation of each element in radians Read more
sourcefn log_approx(&mut self, base: T)
fn log_approx(&mut self, base: T)
Calculates the approximated logarithm to the given base for every vector element. Read more
sourcefn expf_approx(&mut self, base: T)
fn expf_approx(&mut self, base: T)
Calculates the approximated exponential to the given base for every vector element. Read more
sourcefn powf_approx(&mut self, exponent: T)
fn powf_approx(&mut self, exponent: T)
Raises every vector element to approximately a floating point power. Read more
sourceimpl<V, S, T> ComplexOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexOps<T>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> ComplexOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexOps<T>,
S: ToSlice<T>,
T: RealNumber,
sourcefn multiply_complex_exponential(&mut self, a: T, b: T)
fn multiply_complex_exponential(&mut self, a: T, b: T)
Multiplies each vector element with
exp(j*(a*idx*self.delta() + b))
where a
and b
are arguments and idx
is the index of the data points
in the vector ranging from 0 to self.points() - 1
. j
is the imaginary number and
exp
the exponential function. Read moresourceimpl<V, S, T, N, D, O> ComplexToRealGetterOps<O, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealGetterOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
impl<V, S, T, N, D, O> ComplexToRealGetterOps<O, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealGetterOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
sourcefn get_real(&self, destination: &mut O)
fn get_real(&self, destination: &mut O)
Copies all real elements into the given vector. Read more
sourcefn get_imag(&self, destination: &mut O)
fn get_imag(&self, destination: &mut O)
Copies all imag elements into the given vector. Read more
sourcefn get_magnitude(&self, destination: &mut O)
fn get_magnitude(&self, destination: &mut O)
Copies the absolute value or magnitude of all vector elements into the given target vector. Read more
sourcefn get_magnitude_squared(&self, destination: &mut O)
fn get_magnitude_squared(&self, destination: &mut O)
Copies the absolute value squared or magnitude squared of all vector elements
into the given target vector. Read more
sourcefn get_phase(&self, destination: &mut O)
fn get_phase(&self, destination: &mut O)
Copies the phase of all elements in [rad] into the given vector. Read more
sourcefn get_real_imag(&self, real: &mut O, imag: &mut O)
fn get_real_imag(&self, real: &mut O, imag: &mut O)
Gets the real and imaginary parts and stores them in the given vectors.
See also
get_phase
and
get_complex_abs
for further
information. Read moresourceimpl<V, S, T, N, D, O> ComplexToRealSetterOps<O, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealSetterOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
impl<V, S, T, N, D, O> ComplexToRealSetterOps<O, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealSetterOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
sourcefn set_real_imag(&mut self, real: &O, imag: &O) -> Result<(), ErrorReason>
fn set_real_imag(&mut self, real: &O, imag: &O) -> Result<(), ErrorReason>
Overrides the
self
vectors data with the real and imaginary data in the given vectors.
real
and imag
must have the same size. Read moresourcefn set_mag_phase(&mut self, mag: &O, phase: &O) -> Result<(), ErrorReason>
fn set_mag_phase(&mut self, mag: &O, phase: &O) -> Result<(), ErrorReason>
Overrides the
self
vectors data with the magnitude and phase data in the given vectors.
Note that self
vector will immediately convert the data into a real and
imaginary representation of the complex numbers which is its default format.
mag
and phase
must have the same size. Read moresourceimpl<V, S, T> ComplexToRealTransformsOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealTransformsOps<T>,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
impl<V, S, T> ComplexToRealTransformsOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealTransformsOps<T>,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
sourcefn magnitude(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
fn magnitude(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
Gets the absolute value, magnitude or norm of all vector elements. Read more
sourcefn magnitude_squared(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
fn magnitude_squared(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
Gets the square root of the absolute value of all vector elements. Read more
sourcefn to_real(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
fn to_real(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
Gets all real elements. Read more
sourcefn to_imag(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
fn to_imag(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
Gets all imag elements. Read more
sourcefn phase(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
fn phase(self) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResult
Gets the phase of all elements in [rad]. Read more
sourceimpl<V, S, T> ComplexToRealTransformsOpsBuffered<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealTransformsOpsBuffered<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
impl<V, S, T> ComplexToRealTransformsOpsBuffered<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + ComplexToRealTransformsOpsBuffered<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
sourcefn magnitude_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
fn magnitude_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
Gets the absolute value, magnitude or norm of all vector elements. Read more
sourcefn magnitude_squared_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
fn magnitude_squared_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
Gets the square root of the absolute value of all vector elements. Read more
sourcefn to_real_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
fn to_real_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
Gets all real elements. Read more
sourcefn to_imag_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
fn to_imag_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
Gets all imag elements. Read more
sourcefn phase_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
fn phase_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToRealResult>::RealResultwhere
B: for<'b> Buffer<'b, S, T>,
Gets the phase of all elements in [rad]. Read more
sourceimpl<'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 RealImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + Convolution<'a, S, T, &'a (dyn RealImpulseResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn 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>,
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>,
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, S, T, N, D> ConvolutionOps<[[&'a DspVec<S, T, N, D>; 2]; 2], S, T, N, D> for Matrix2xN<DspVec<S, T, N, D>, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<'a, S, T, N, D> ConvolutionOps<[[&'a DspVec<S, T, N, D>; 2]; 2], S, T, N, D> for Matrix2xN<DspVec<S, T, N, D>, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
sourcefn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &[[&'a DspVec<S, T, N, D>; 2]; 2]
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
fn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &[[&'a DspVec<S, T, N, D>; 2]; 2]
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, 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. Read moresourceimpl<S, T, N, D> ConvolutionOps<DspVec<S, T, N, D>, S, T, N, D> for Matrix2xN<DspVec<S, T, N, D>, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<S, T, N, D>, S, T, N, D>,
impl<S, T, N, D> ConvolutionOps<DspVec<S, T, N, D>, S, T, N, D> for Matrix2xN<DspVec<S, T, N, D>, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
DspVec<S, T, N, D>: ConvolutionOps<DspVec<S, T, N, D>, S, T, N, D>,
sourcefn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &DspVec<S, T, N, D>
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
fn convolve_signal<B>(
&mut self,
buffer: &mut B,
impulse_response: &DspVec<S, T, N, D>
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, 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. Read moresourceimpl<V, S, T> CrossCorrelationArgumentOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + CrossCorrelationArgumentOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
impl<V, S, T> CrossCorrelationArgumentOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + CrossCorrelationArgumentOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
sourcefn prepare_argument<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
fn prepare_argument<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
Prepares an argument to be used for convolution. Preparing an argument includes two steps: Read more
sourcefn prepare_argument_padded<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
fn prepare_argument_padded<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
Prepares an argument to be used for convolution. The argument is zero padded to
length of
2 * self.points() - 1
and then the same operations are performed as described for prepare_argument
. Read moresourceimpl<S, T, N, D, O, V> CrossCorrelationOps<O, S, T, N, D> for Matrix2xN<V, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
V: CrossCorrelationOps<V, S, T, N, D> + GetMetaData<T, N, D> + Vector<T>,
impl<S, T, N, D, O, V> CrossCorrelationOps<O, S, T, N, D> for Matrix2xN<V, S, T>where
S: ToSliceMut<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
O: Matrix<V, T> + GetMetaData<T, N, D>,
V: CrossCorrelationOps<V, S, T, N, D> + GetMetaData<T, N, D> + Vector<T>,
sourcefn correlate<B>(&mut self, buffer: &mut B, other: &O) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
fn correlate<B>(&mut self, buffer: &mut B, other: &O) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
Calculates the correlation between
self
and other
. other
needs to be a time vector which
went through one of the prepare functions prepare_argument
or prepare_argument_padded
.
See also the trait description for more details. Read moresourceimpl<S, V, T> DiffSumOps for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DiffSumOps,
T: RealNumber,
impl<S, V, T> DiffSumOps for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DiffSumOps,
T: RealNumber,
sourceimpl<S, V, T, N, D> DotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<S, V, T, N, D> DotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
type Output = Result<Vec<T, Global>, ErrorReason>
sourcefn dot_product(
&self,
factor: &Matrix2xN<V, S, T>
) -> Result<Vec<T, Global>, ErrorReason>
fn dot_product(
&self,
factor: &Matrix2xN<V, S, T>
) -> Result<Vec<T, Global>, ErrorReason>
Calculates the dot product of self and factor. Self and factor remain unchanged. Read more
sourceimpl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<S, V, T, N, D> DotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + DotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
type Output = Result<[T; 2], ErrorReason>
sourcefn dot_product(&self, factor: &V) -> Result<[T; 2], ErrorReason>
fn dot_product(&self, factor: &V) -> Result<[T; 2], ErrorReason>
Calculates the dot product of self and factor. Self and factor remain unchanged. Read more
sourceimpl<V, S, T, N, D> ElementaryOps<Matrix2xN<V, S, T>, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<V, S, T, N, D> ElementaryOps<Matrix2xN<V, S, T>, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
sourcefn add(&mut self, summand: &Matrix2xN<V, S, T>) -> Result<(), ErrorReason>
fn add(&mut self, summand: &Matrix2xN<V, S, T>) -> Result<(), ErrorReason>
Calculates the sum of
self + summand
. It consumes self and returns the result. Read moresourcefn sub(&mut self, summand: &Matrix2xN<V, S, T>) -> Result<(), ErrorReason>
fn sub(&mut self, summand: &Matrix2xN<V, S, T>) -> Result<(), ErrorReason>
Calculates the difference of
self - subtrahend
. It consumes self and returns the result. Read moresourceimpl<V, S, T, N, D> ElementaryOps<V, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<V, S, T, N, D> ElementaryOps<V, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
sourcefn add(&mut self, summand: &V) -> Result<(), ErrorReason>
fn add(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the sum of
self + summand
. It consumes self and returns the result. Read moresourcefn sub(&mut self, summand: &V) -> Result<(), ErrorReason>
fn sub(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the difference of
self - subtrahend
. It consumes self and returns the result. Read moresourceimpl<V, S, T, N, D> ElementaryWrapAroundOps<Matrix2xN<V, S, T>, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryWrapAroundOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<V, S, T, N, D> ElementaryWrapAroundOps<Matrix2xN<V, S, T>, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryWrapAroundOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
sourcefn add_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
fn add_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
Calculates the sum of
self + summand
. summand
may be smaller than self
as long
as self.len() % summand.len() == 0
. THe result is the same as it would be if
you would repeat summand
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn sub_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
fn sub_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
Calculates the sum of
self - subtrahend
. subtrahend
may be smaller than self
as long
as self.len() % subtrahend.len() == 0
. THe result is the same as it would be if
you would repeat subtrahend
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn div_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
fn div_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
Calculates the sum of
self - divisor
. divisor
may be smaller than self
as long
as self.len() % divisor.len() == 0
. THe result is the same as it would be if
you would repeat divisor
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn mul_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
fn mul_smaller(
&mut self,
summand: &Matrix2xN<V, S, T>
) -> Result<(), ErrorReason>
Calculates the sum of
self - factor
. factor
may be smaller than self
as long
as self.len() % factor.len() == 0
. THe result is the same as it would be if
you would repeat factor
until it has the same length as self
.
It consumes self and returns the result. Read moresourceimpl<V, S, T, N, D> ElementaryWrapAroundOps<V, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryWrapAroundOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<V, S, T, N, D> ElementaryWrapAroundOps<V, T, N, D> for Matrix2xN<V, S, T>where
V: Vector<T> + ElementaryWrapAroundOps<V, T, N, D> + GetMetaData<T, N, D>,
S: ToSlice<T>,
T: RealNumber,
N: NumberSpace,
D: Domain,
sourcefn add_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
fn add_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the sum of
self + summand
. summand
may be smaller than self
as long
as self.len() % summand.len() == 0
. THe result is the same as it would be if
you would repeat summand
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn sub_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
fn sub_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the sum of
self - subtrahend
. subtrahend
may be smaller than self
as long
as self.len() % subtrahend.len() == 0
. THe result is the same as it would be if
you would repeat subtrahend
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn div_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
fn div_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the sum of
self - divisor
. divisor
may be smaller than self
as long
as self.len() % divisor.len() == 0
. THe result is the same as it would be if
you would repeat divisor
until it has the same length as self
.
It consumes self and returns the result. Read moresourcefn mul_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
fn mul_smaller(&mut self, summand: &V) -> Result<(), ErrorReason>
Calculates the sum of
self - factor
. factor
may be smaller than self
as long
as self.len() % factor.len() == 0
. THe result is the same as it would be if
you would repeat factor
until it has the same length as self
.
It consumes self and returns the result. Read moresourceimpl<V, S, T> FrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
impl<V, S, T> FrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn mirror<B>(&mut self, buffer: &mut B)where
B: for<'b> Buffer<'b, S, T>,
fn mirror<B>(&mut self, buffer: &mut B)where
B: for<'b> Buffer<'b, S, T>,
This function mirrors the spectrum vector to transform a symmetric spectrum
into a full spectrum with the DC element at index 0 (no FFT shift/swap halves). Read more
sourcefn ifft_shift(&mut self)
fn ifft_shift(&mut self)
Swaps vector halves before an Inverse Fourier Transformation.
sourceimpl<'a, V, S, T> FrequencyMultiplication<'a, S, T, &'a (dyn ComplexFrequencyResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyMultiplication<'a, S, T, &'a (dyn ComplexFrequencyResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> FrequencyMultiplication<'a, S, T, &'a (dyn ComplexFrequencyResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyMultiplication<'a, S, T, &'a (dyn ComplexFrequencyResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn multiply_frequency_response(
&mut self,
frequency_response: &'a (dyn ComplexFrequencyResponse<T> + 'a),
ratio: T
)
fn multiply_frequency_response(
&mut self,
frequency_response: &'a (dyn ComplexFrequencyResponse<T> + 'a),
ratio: T
)
sourceimpl<'a, V, S, T> FrequencyMultiplication<'a, S, T, &'a (dyn RealFrequencyResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyMultiplication<'a, S, T, &'a (dyn RealFrequencyResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
impl<'a, V, S, T> FrequencyMultiplication<'a, S, T, &'a (dyn RealFrequencyResponse<T> + 'a)> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyMultiplication<'a, S, T, &'a (dyn RealFrequencyResponse<T> + 'a)>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn multiply_frequency_response(
&mut self,
frequency_response: &'a (dyn RealFrequencyResponse<T> + 'a),
ratio: T
)
fn multiply_frequency_response(
&mut self,
frequency_response: &'a (dyn RealFrequencyResponse<T> + 'a),
ratio: T
)
sourceimpl<V, S, T> FrequencyToTimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyToTimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToTimeResult>::TimeResult: Vector<T>,
impl<V, S, T> FrequencyToTimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + FrequencyToTimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToTimeResult>::TimeResult: Vector<T>,
sourcefn plain_ifft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
fn plain_ifft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector
into a time domain vector. Read more
sourcefn ifft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
fn ifft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector
into a time domain vector. Read more
sourcefn windowed_ifft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
fn windowed_ifft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> <Matrix2xN<V, S, T> as ToTimeResult>::TimeResultwhere
B: for<'b> Buffer<'b, S, T>,
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector
into a time domain vector and removes the FFT window. Read more
sourceimpl<V, S, T> FromMatrix<T> for Matrix2xN<V, S, T>where
T: RealNumber,
V: Vector<T>,
S: ToSlice<T>,
impl<V, S, T> FromMatrix<T> for Matrix2xN<V, S, T>where
T: RealNumber,
V: Vector<T>,
S: ToSlice<T>,
sourceimpl<V, S, T, N, D> GetMetaData<T, N, D> for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T> + GetMetaData<T, N, D>,
N: NumberSpace,
D: Domain,
impl<V, S, T, N, D> GetMetaData<T, N, D> for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T> + GetMetaData<T, N, D>,
N: NumberSpace,
D: Domain,
sourcefn get_meta_data(&self) -> TypeMetaData<T, N, D>
fn get_meta_data(&self) -> TypeMetaData<T, N, D>
Gets a copy of the vector meta data. This can be used to create
new types with the same meta data. Read more
sourceimpl<V, S, T> InterpolationOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + InterpolationOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
impl<V, S, T> InterpolationOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + InterpolationOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn interpolatef<B>(
&mut self,
buffer: &mut B,
function: &dyn RealImpulseResponse<T>,
interpolation_factor: T,
delay: T,
conv_len: usize
)where
B: for<'b> Buffer<'b, S, T>,
fn interpolatef<B>(
&mut self,
buffer: &mut B,
function: &dyn RealImpulseResponse<T>,
interpolation_factor: T,
delay: T,
conv_len: usize
)where
B: for<'b> Buffer<'b, S, T>,
Interpolates
self
with the convolution function function
by the real value
interpolation_factor
. InterpolationOps is done in time domain and the argument
conv_len
can be used to balance accuracy and computational performance.
A delay
can be used to delay or phase shift the vector.
The delay
considers self.delta()
. Read moresourcefn interpolatei<B>(
&mut self,
buffer: &mut B,
function: &dyn RealFrequencyResponse<T>,
interpolation_factor: u32
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
fn interpolatei<B>(
&mut self,
buffer: &mut B,
function: &dyn RealFrequencyResponse<T>,
interpolation_factor: u32
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
Interpolates
self
with the convolution function function
by the integer value
interpolation_factor
. InterpolationOps is done in in frequency domain. Read moresourcefn interpolate<B>(
&mut self,
buffer: &mut B,
function: Option<&dyn RealFrequencyResponse<T>>,
dest_points: usize,
delay: T
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
fn interpolate<B>(
&mut self,
buffer: &mut B,
function: Option<&dyn RealFrequencyResponse<T>>,
dest_points: usize,
delay: T
) -> Result<(), ErrorReason>where
B: for<'b> Buffer<'b, S, T>,
Interpolates the signal in frequency domain by padding it with zeros.
sourceimpl<S, V, T, R> MapAggregateOps<T, R> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapAggregateOps<T, R, Output = Result<R, ErrorReason>>,
T: RealNumber,
R: Send,
impl<S, V, T, R> MapAggregateOps<T, R> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapAggregateOps<T, R, Output = Result<R, ErrorReason>>,
T: RealNumber,
R: Send,
type Output = Result<[R; 2], ErrorReason>
sourcefn map_aggregate<'a, A, FMap, FAggr>(
&self,
argument: A,
map: &FMap,
aggregate: &FAggr
) -> Result<[R; 2], ErrorReason>where
A: Sync + Copy + Send,
FMap: 'a + Fn(T, usize, A) -> R + Sync,
FAggr: 'a + Fn(R, R) -> R + Sync + Send,
R: Send,
fn map_aggregate<'a, A, FMap, FAggr>(
&self,
argument: A,
map: &FMap,
aggregate: &FAggr
) -> Result<[R; 2], ErrorReason>where
A: Sync + Copy + Send,
FMap: 'a + Fn(T, usize, A) -> R + Sync,
FAggr: 'a + Fn(R, R) -> R + Sync + Send,
R: Send,
Transforms all vector elements using the function
map
and then aggregates
all the results with aggregate
. aggregate
must be a commutativity and associativity;
that’s because there is no guarantee that the numbers will
be aggregated in any deterministic order. Read moresourceimpl<S, V, T> MapInplaceOps<Complex<T>> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapInplaceOps<Complex<T>>,
T: RealNumber,
impl<S, V, T> MapInplaceOps<Complex<T>> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapInplaceOps<Complex<T>>,
T: RealNumber,
sourceimpl<S, V, T> MapInplaceOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapInplaceOps<T>,
T: RealNumber,
impl<S, V, T> MapInplaceOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + MapInplaceOps<T>,
T: RealNumber,
sourceimpl<V, S, T> Matrix<V, T> for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
impl<V, S, T> Matrix<V, T> for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
sourcefn delta(&self) -> T
fn delta(&self) -> T
The x-axis delta. If
domain
is time domain then delta
is in [s]
,
in frequency domain delta
is in [Hz]
. Read moresourcefn set_delta(&mut self, delta: T)
fn set_delta(&mut self, delta: T)
Sets the x-axis delta. If
domain
is time domain then delta
is in [s]
,
in frequency domain delta
is in [Hz]
. Read moresourcefn row_len(&self) -> usize
fn row_len(&self) -> usize
The number of valid elements in each row of the matrix. This can be changed
with the
Resize
trait. Read moresourcefn row_points(&self) -> usize
fn row_points(&self) -> usize
The number of valid points in a row. If the matrix is complex then every valid point
consists of two floating point numbers,
while for real vectors every point only consists of one floating point number. Read more
sourceimpl<V, S, T> MetaData for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
impl<V, S, T> MetaData for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
sourcefn domain(&self) -> DataDomain
fn domain(&self) -> DataDomain
The domain in which the data vector resides. Basically specifies the x-axis and the
type of operations which are valid on this vector. Read more
sourcefn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Indicates whether the vector contains complex data. This also specifies the type
of operations which are valid on this vector. Read more
sourceimpl<V, S, T> ModuloOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ModuloOps<T>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> ModuloOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ModuloOps<T>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<V, S, T> OffsetOps<Complex<T>> for Matrix2xN<V, S, T>where
V: Vector<T> + OffsetOps<Complex<T>>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> OffsetOps<Complex<T>> for Matrix2xN<V, S, T>where
V: Vector<T> + OffsetOps<Complex<T>>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<V, S, T> OffsetOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + OffsetOps<T>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> OffsetOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + OffsetOps<T>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<S, V, T> PowerOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PowerOps<T>,
T: RealNumber,
impl<S, V, T> PowerOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PowerOps<T>,
T: RealNumber,
sourcefn powf(&mut self, exponent: T)
fn powf(&mut self, exponent: T)
Raises every vector element to a floating point power. Read more
sourcefn ln(&mut self)
fn ln(&mut self)
Computes the principal value of natural logarithm of every element in the vector. Read more
sourceimpl<S, V, T, N, D> PreciseDotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseDotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<S, V, T, N, D> PreciseDotProductOps<Matrix2xN<V, S, T>, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseDotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
type Output = Result<Vec<T, Global>, ErrorReason>
sourcefn dot_product_prec(
&self,
factor: &Matrix2xN<V, S, T>
) -> Result<Vec<T, Global>, ErrorReason>
fn dot_product_prec(
&self,
factor: &Matrix2xN<V, S, T>
) -> Result<Vec<T, Global>, ErrorReason>
Calculates the dot product of self and factor using a more precise
but slower algorithm. Self and factor remain unchanged. Read more
sourceimpl<S, V, T, N, D> PreciseDotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseDotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
impl<S, V, T, N, D> PreciseDotProductOps<V, T, T, N, D> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseDotProductOps<V, T, T, N, D, Output = Result<T, ErrorReason>> + GetMetaData<T, N, D>,
T: RealNumber,
N: NumberSpace,
D: Domain,
type Output = Result<[T; 2], ErrorReason>
sourcefn dot_product_prec(&self, factor: &V) -> Result<[T; 2], ErrorReason>
fn dot_product_prec(&self, factor: &V) -> Result<[T; 2], ErrorReason>
Calculates the dot product of self and factor using a more precise
but slower algorithm. Self and factor remain unchanged. Read more
sourceimpl<S, V, T> PreciseStatisticsOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseStatisticsOps<Statistics<T>, Result = Statistics<T>>,
T: RealNumber,
impl<S, V, T> PreciseStatisticsOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseStatisticsOps<Statistics<T>, Result = Statistics<T>>,
T: RealNumber,
type Result = [Statistics<T>; 2]
sourcefn statistics_prec(
&self
) -> <Matrix2xN<V, S, T> as PreciseStatisticsOps<T>>::Result
fn statistics_prec(
&self
) -> <Matrix2xN<V, S, T> as PreciseStatisticsOps<T>>::Result
Calculates the statistics of the data contained in the vector using
a more precise but slower algorithm. Read more
sourceimpl<S, V, T> PreciseStatisticsSplitOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseStatisticsSplitOps<Statistics<T>, Result = ArrayVec<Statistics<T>, _>>,
T: RealNumber,
impl<S, V, T> PreciseStatisticsSplitOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseStatisticsSplitOps<Statistics<T>, Result = ArrayVec<Statistics<T>, _>>,
T: RealNumber,
type Result = [ArrayVec<Statistics<T>, _>; 2]
sourcefn statistics_split_prec(
&self,
len: usize
) -> Result<<Matrix2xN<V, S, T> as PreciseStatisticsSplitOps<T>>::Result, ErrorReason>
fn statistics_split_prec(
&self,
len: usize
) -> Result<<Matrix2xN<V, S, T> as PreciseStatisticsSplitOps<T>>::Result, ErrorReason>
Calculates the statistics of the data contained in the vector as if the vector would
have been split into
len
pieces
using a more precise but slower algorithm. self.len
should be dividable by
len
without a remainder,
but this isn’t enforced by the implementation.
For implementation reasons len <= 16
must be true. Read moresourceimpl<S, V, T, O> PreciseSumOps<[O; 2]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseSumOps<O>,
T: RealNumber,
O: RealNumber,
impl<S, V, T, O> PreciseSumOps<[O; 2]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + PreciseSumOps<O>,
T: RealNumber,
O: RealNumber,
sourceimpl<V, S, T> RealInterpolationOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealInterpolationOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
impl<V, S, T> RealInterpolationOps<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealInterpolationOps<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn interpolate_hermite<B>(
&mut self,
buffer: &mut B,
interpolation_factor: T,
delay: T
)where
B: for<'b> Buffer<'b, S, T>,
fn interpolate_hermite<B>(
&mut self,
buffer: &mut B,
interpolation_factor: T,
delay: T
)where
B: for<'b> Buffer<'b, S, T>,
Piecewise cubic hermite interpolation between samples.
sourcefn interpolate_lin<B>(&mut self, buffer: &mut B, interpolation_factor: T, delay: T)where
B: for<'b> Buffer<'b, S, T>,
fn interpolate_lin<B>(&mut self, buffer: &mut B, interpolation_factor: T, delay: T)where
B: for<'b> Buffer<'b, S, T>,
Linear interpolation between samples.
sourceimpl<V, S, T> RealOps for Matrix2xN<V, S, T>where
V: Vector<T> + RealOps,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> RealOps for Matrix2xN<V, S, T>where
V: Vector<T> + RealOps,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<V, S, T> RealToComplexTransformsOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealToComplexTransformsOps<T>,
S: ToSlice<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
impl<V, S, T> RealToComplexTransformsOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealToComplexTransformsOps<T>,
S: ToSlice<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
sourcefn to_complex(
self
) -> Result<<Matrix2xN<V, S, T> as ToComplexResult>::ComplexResult, (ErrorReason, <Matrix2xN<V, S, T> as ToComplexResult>::ComplexResult)>
fn to_complex(
self
) -> Result<<Matrix2xN<V, S, T> as ToComplexResult>::ComplexResult, (ErrorReason, <Matrix2xN<V, S, T> as ToComplexResult>::ComplexResult)>
Converts the real vector into a complex vector. Read more
sourceimpl<V, S, T> RealToComplexTransformsOpsBuffered<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealToComplexTransformsOpsBuffered<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
impl<V, S, T> RealToComplexTransformsOpsBuffered<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + RealToComplexTransformsOpsBuffered<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
sourcefn to_complex_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToComplexResult>::ComplexResultwhere
B: for<'b> Buffer<'b, S, T>,
fn to_complex_b<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToComplexResult>::ComplexResultwhere
B: for<'b> Buffer<'b, S, T>,
Converts the real vector into a complex vector. The buffer allows
this operation to succeed even if the storage type doesn’t allow resizing. Read more
sourceimpl<V, O, S, T> RededicateForceOps<Matrix2xN<O, S, T>> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
T: RealNumber,
V: RededicateForceOps<O> + Vector<T>,
O: Vector<T>,
impl<V, O, S, T> RededicateForceOps<Matrix2xN<O, S, T>> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
T: RealNumber,
V: RededicateForceOps<O> + Vector<T>,
O: Vector<T>,
sourcefn rededicate_from_force(origin: Matrix2xN<O, S, T>) -> Matrix2xN<V, S, T>
fn rededicate_from_force(origin: Matrix2xN<O, S, T>) -> Matrix2xN<V, S, T>
Make
Other
a Self
without performing any checks.sourcefn rededicate_with_runtime_data(
origin: Matrix2xN<O, S, T>,
is_complex: bool,
domain: DataDomain
) -> Matrix2xN<V, S, T>
fn rededicate_with_runtime_data(
origin: Matrix2xN<O, S, T>,
is_complex: bool,
domain: DataDomain
) -> Matrix2xN<V, S, T>
sourceimpl<V, S, T> ReorganizeDataOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ReorganizeDataOps<T>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> ReorganizeDataOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ReorganizeDataOps<T>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<V, S, T> ResizeOps for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
impl<V, S, T> ResizeOps for Matrix2xN<V, S, T>where
T: RealNumber,
S: ToSlice<T>,
V: Vector<T>,
sourceimpl<V, S, T> ScaleOps<Complex<T>> for Matrix2xN<V, S, T>where
V: Vector<T> + ScaleOps<Complex<T>>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> ScaleOps<Complex<T>> for Matrix2xN<V, S, T>where
V: Vector<T> + ScaleOps<Complex<T>>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<V, S, T> ScaleOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ScaleOps<T>,
S: ToSlice<T>,
T: RealNumber,
impl<V, S, T> ScaleOps<T> for Matrix2xN<V, S, T>where
V: Vector<T> + ScaleOps<T>,
S: ToSlice<T>,
T: RealNumber,
sourceimpl<S, V, T> StatisticsOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + StatisticsOps<Statistics<T>, Result = Statistics<T>>,
T: RealNumber,
impl<S, V, T> StatisticsOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + StatisticsOps<Statistics<T>, Result = Statistics<T>>,
T: RealNumber,
type Result = [Statistics<T>; 2]
sourcefn statistics(&self) -> <Matrix2xN<V, S, T> as StatisticsOps<T>>::Result
fn statistics(&self) -> <Matrix2xN<V, S, T> as StatisticsOps<T>>::Result
Calculates the statistics of the data. Read more
sourceimpl<S, V, T> StatisticsSplitOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + StatisticsSplitOps<Statistics<T>, Result = ArrayVec<Statistics<T>, _>>,
T: RealNumber,
impl<S, V, T> StatisticsSplitOps<T> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + StatisticsSplitOps<Statistics<T>, Result = ArrayVec<Statistics<T>, _>>,
T: RealNumber,
type Result = [ArrayVec<Statistics<T>, _>; 2]
sourcefn statistics_split(
&self,
len: usize
) -> Result<<Matrix2xN<V, S, T> as StatisticsSplitOps<T>>::Result, ErrorReason>
fn statistics_split(
&self,
len: usize
) -> Result<<Matrix2xN<V, S, T> as StatisticsSplitOps<T>>::Result, ErrorReason>
Calculates the statistics of the data contained in the vector as if the vector would
have been split into
len
pieces. self.len
should be dividable by
len
without a remainder,
but this isn’t enforced by the implementation.
For implementation reasons len <= 16
must be true. Read moresourceimpl<S, V, T> SumOps<[T; 2]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
impl<S, V, T> SumOps<[T; 2]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
sourceimpl<S, V, T> SumOps<[T; 3]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
impl<S, V, T> SumOps<[T; 3]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
sourceimpl<S, V, T> SumOps<[T; 4]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
impl<S, V, T> SumOps<[T; 4]> for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + SumOps<T>,
T: RealNumber,
sourceimpl<V, S, T> SymmetricFrequencyToTimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + SymmetricFrequencyToTimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToRealTimeResult>::RealTimeResult: Vector<T>,
impl<V, S, T> SymmetricFrequencyToTimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + SymmetricFrequencyToTimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToRealTimeResult>::RealTimeResult: Vector<T>,
sourcefn plain_sifft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
fn plain_sifft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Inverse Fast Fourier Transformation under the assumption that
self
contains half of a symmetric spectrum starting from 0 Hz. This assumption
isn’t verified and no error is raised if the spectrum isn’t symmetric. The reason
for this is that there is no robust verification possible. Read moresourcefn sifft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
fn sifft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Inverse Fast Fourier Transformation under the assumption that
self
contains half of a symmetric spectrum starting from 0 Hz. This assumption
isn’t verified and no error is raised if the spectrum isn’t symmetric. The reason
for this is that there is no robust verification possible. Read moresourcefn windowed_sifft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
fn windowed_sifft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> Result<<Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <Matrix2xN<V, S, T> as ToRealTimeResult>::RealTimeResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Inverse Fast Fourier Transformation (SIFFT) and removes the FFT
window. The SIFFT is performed under the assumption that
self
contains half of a symmetric spectrum starting from 0 Hz. This assumption
isn’t verified and no error is raised if the spectrum isn’t symmetric. The reason
for this is that there is no robust verification possible. Read moresourceimpl<V, S, T> SymmetricTimeToFrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + SymmetricTimeToFrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
impl<V, S, T> SymmetricTimeToFrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + SymmetricTimeToFrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
sourcefn plain_sfft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
fn plain_sfft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Fast Fourier Transformation under the assumption that
self
is symmetric around the center. This assumption
isn’t verified and no error is raised if the vector isn’t symmetric. Read moresourcefn sfft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
fn sfft<B>(
self,
buffer: &mut B
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Fast Fourier Transformation under the assumption that
self
is symmetric around the center. This assumption
isn’t verified and no error is raised if the vector isn’t symmetric. Read moresourcefn windowed_sfft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
fn windowed_sfft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> Result<<Matrix2xN<V, S, T> as ToFreqResult>::FreqResult, (ErrorReason, <Matrix2xN<V, S, T> as ToFreqResult>::FreqResult)>where
B: for<'b> Buffer<'b, S, T>,
Performs a Symmetric Fast Fourier Transformation under the assumption that
self
is symmetric around the center. This assumption
isn’t verified and no error is raised if the vector isn’t symmetric. Read moresourceimpl<V, S, T> TimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + TimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
impl<V, S, T> TimeDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + TimeDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
sourcefn apply_window(&mut self, window: &dyn WindowFunction<T>)
fn apply_window(&mut self, window: &dyn WindowFunction<T>)
Applies a window to the data vector.
sourcefn unapply_window(&mut self, window: &dyn WindowFunction<T>)
fn unapply_window(&mut self, window: &dyn WindowFunction<T>)
Removes a window from the data vector.
sourceimpl<V, S, T> TimeToFrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + TimeToFrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
impl<V, S, T> TimeToFrequencyDomainOperations<S, T> for Matrix2xN<V, S, T>where
V: Vector<T> + TimeToFrequencyDomainOperations<S, T>,
S: ToSliceMut<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
sourcefn plain_fft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
fn plain_fft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
Performs a Fast Fourier Transformation transforming a time domain vector
into a frequency domain vector. Read more
sourcefn fft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
fn fft<B>(
self,
buffer: &mut B
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
Performs a Fast Fourier Transformation transforming a time domain vector
into a frequency domain vector. Read more
sourcefn windowed_fft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
fn windowed_fft<B>(
self,
buffer: &mut B,
window: &dyn WindowFunction<T>
) -> <Matrix2xN<V, S, T> as ToFreqResult>::FreqResultwhere
B: for<'b> Buffer<'b, S, T>,
Applies a FFT window and performs a Fast Fourier Transformation transforming a time
domain vector into a frequency domain vector. Read more
sourceimpl<V, S, T> ToComplexResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToComplexResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
impl<V, S, T> ToComplexResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToComplexResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToComplexResult>::ComplexResult: Vector<T>,
type ComplexResult = Matrix2xN<<V as ToComplexResult>::ComplexResult, S, T>
sourceimpl<V, S, T> ToFreqResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToFreqResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
impl<V, S, T> ToFreqResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToFreqResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToFreqResult>::FreqResult: Vector<T>,
type FreqResult = Matrix2xN<<V as ToFreqResult>::FreqResult, S, T>
sourceimpl<V, S, T> ToRealResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToRealResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
impl<V, S, T> ToRealResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToRealResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealResult>::RealResult: Vector<T>,
type RealResult = Matrix2xN<<V as ToRealResult>::RealResult, S, T>
sourceimpl<V, S, T> ToRealTimeResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToRealTimeResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealTimeResult>::RealTimeResult: Vector<T>,
impl<V, S, T> ToRealTimeResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToRealTimeResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToRealTimeResult>::RealTimeResult: Vector<T>,
type RealTimeResult = Matrix2xN<<V as ToRealTimeResult>::RealTimeResult, S, T>
sourceimpl<V, S, T> ToTimeResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToTimeResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToTimeResult>::TimeResult: Vector<T>,
impl<V, S, T> ToTimeResult for Matrix2xN<V, S, T>where
V: Vector<T> + ToTimeResult,
S: ToSlice<T>,
T: RealNumber,
<V as ToTimeResult>::TimeResult: Vector<T>,
type TimeResult = Matrix2xN<<V as ToTimeResult>::TimeResult, S, T>
type TimeResult = Matrix2xN<<V as ToTimeResult>::TimeResult, S, T>
Specifies what the the result is if a type is transformed to time domain.
sourceimpl<S, V, T> TrigOps for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + TrigOps,
T: RealNumber,
impl<S, V, T> TrigOps for Matrix2xN<V, S, T>where
S: ToSlice<T>,
V: Vector<T> + TrigOps,
T: RealNumber,
sourcefn asin(&mut self)
fn asin(&mut self)
Calculates the principal value of the inverse sine of each element in radians.
sourcefn acos(&mut self)
fn acos(&mut self)
Calculates the principal value of the inverse cosine of each element in radians.
sourcefn atan(&mut self)
fn atan(&mut self)
Calculates the principal value of the inverse tangent of each element in radians.
sourcefn asinh(&mut self)
fn asinh(&mut self)
Calculates the principal value of the inverse hyperbolic sine of each element in radians.
Auto Trait Implementations
impl<V, S, T> RefUnwindSafe for Matrix2xN<V, S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, S, T> Send for Matrix2xN<V, S, T>where
S: Send,
V: Send,
impl<V, S, T> Sync for Matrix2xN<V, S, T>where
S: Sync,
V: Sync,
impl<V, S, T> Unpin for Matrix2xN<V, S, T>where
S: Unpin,
T: Unpin,
V: Unpin,
impl<V, S, T> UnwindSafe for Matrix2xN<V, S, T>where
S: UnwindSafe,
T: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more