A 1xN (one times N elements) or Nx1 data vector as used for most digital signal processing
(DSP) operations.
Vectors come in different flavors:
- Time or Frequency domain
- Real or Complex numbers
- 32bit or 64bit floating point numbers
The first two flavors define meta information about the vector and provide compile time
information what operations are available with the given vector and how this will transform
the vector. This makes sure that some invalid operations are already discovered at compile
time. In case that this isn't desired or the information about the vector isn't known at
compile time there are the generic DataVec32
and
DataVec64
vectors available.
32bit and 64bit flavors trade performance and memory consumption against accuracy.
32bit vectors are roughly two times faster than 64bit vectors for most operations.
But remember that you should benchmark first before you give away accuracy for performance
unless however you are sure that 32bit accuracy is certainly good enough.
The underlying storage. self.len()
should be called to find out how many
elements in data
contain valid data.
Convolves a vector of vectors (in this lib also considered a matrix) with a vector
of impulse responses and stores the result in target
.
Indicates whether or not the operations on this vector have been successful.
Consider using the statically typed vector versions so that this check doesn't need to be
performed.
Create a new vector in real number space and frequency domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new vector in real number space and frequency domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new vector in real number space and frequency domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new vector in real number space and frequency domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in real number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in real number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in real number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in real number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new generic matrix. delta
can be changed after construction with a call of set_delta
. Read more
Create a new generic matrix. delta
can be changed after construction with a call of set_delta
. Read more
Create a new generic matrix. delta
can be changed after construction with a call of set_delta
. Read more
Create a new generic matrix. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix from a collection of vectors.
Create a new matrix from a collection of vectors.
Create a new matrix from a collection of vectors.
Create a new matrix from a collection of vectors.
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 more
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 more
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 more
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 more
Create a new matrix in complex number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in complex number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in complex number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Create a new matrix in complex number space and time domain. delta
can be changed after construction with a call of set_delta
. Read more
Calculates the sum of the data contained in the vector. # Example Read more
Calculates the sum of the squared data contained in the vector. # Example Read more
Calculates the sum of the data contained in the vector. # Example Read more
Calculates the sum of the squared data contained in the vector. # Example Read more
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 more
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 more
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. # Failures TransRes may report the following ErrorReason
members: Read more
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. # Failures TransRes may report the following ErrorReason
members: Read more
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. # Failures TransRes may report the following ErrorReason
members: Read more
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. # Failures TransRes may report the following ErrorReason
members: Read more
Calculates the statistics of the data. Read more
Calculates the statistics of the data. Read more
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
Gets the square root of all vector elements. Read more
Calculates the n-th root of every vector element. Read more
Raises every vector element to a floating point power. Read more
Computes the principal value of natural logarithm of every element in the vector. Read more
Calculates the natural exponential for every vector element. Read more
Calculates the logarithm to the given base for every vector element. Read more
Calculates the exponential to the given base for every vector element. Read more
Splits the vector into several smaller vectors. self.len()
must be dividable by targets.len()
without a remainder and this condition must be true too targets.len() > 0
. # Failures TransRes may report the following ErrorReason
members: Read more
Multiplies the vector element with a scalar. Read more
Multiplies the vector element with a scalar. Read more
Appends zeros add the end of the vector until the vector has the size given in the points argument. If points
smaller than the self.len()
then this operation will return an error. Read more
Interleaves zeros factor - 1
times after every vector element, so that the resulting vector will have a length of self.len() * factor
. Read more
Multiplies self
with the frequency response function frequency_response
. Read more
Multiplies self
with the frequency response function frequency_response
. Read more
Appends zeros add the end of the vector until the vector has the size given in the points argument. If points
smaller than the self.len()
then this operation won't do anything, however in future it will raise an error. Read more
Interleaves zeros factor - 1
times after every vector element, so that the resulting vector will have a length of self.len() * factor
. Read more
Reverses the data inside the vector. Read more
This function swaps both halves of the vector. This operation is also called FFT shift Use it after a plain_fft
to get a spectrum which is centered at 0 Hz
. Read more
Changes self.len()
. If self.is_complex()
is true then len
must be an even number. len > self.alloc_len()
is only possible if the underlying storage supports resizing. Read more
Performs a Fast Fourier Transformation transforming a time domain vector into a frequency domain vector. Read more
Performs a Fast Fourier Transformation transforming a time domain vector into a frequency domain vector. # Example Read more
Applies a FFT window and performs a Fast Fourier Transformation transforming a time domain vector into a frequency domain vector. Read more
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
Indicates whether the vector contains complex data. This also specifies the type of operations which are valid on this vector. Read more
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 more
Calculates the complex conjugate of the vector. # Example Read more
Linear interpolation between samples.
Piecewise cubic hermite interpolation between samples.
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation.
impl<S, T, N, D> Index<RangeFull> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = [T]
The returned type after indexing.
Performs the indexing (container[index]
) operation.
impl<S, T, N, D> Index<usize> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = T
The returned type after indexing.
Performs the indexing (container[index]
) operation.
impl<S, T, N, D> Index<Range<usize>> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = [T]
The returned type after indexing.
Performs the indexing (container[index]
) operation.
impl<S, T, N, D> Index<RangeFrom<usize>> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = [T]
The returned type after indexing.
Performs the indexing (container[index]
) operation.
impl<S, T, N, D, DF, O, NO> CrossCorrelationOps<O, S, T, NO, DF> for DspVec<S, T, N, D> where D: TimeDomain, DF: FrequencyDomain, N: ComplexNumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + GetMetaData<T, NO, DF> + Index<RangeFull, Output = [T]>, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ScaleOps<T>, | [src] |
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 more
impl<S, T, N, D> CrossCorrelationArgumentOps<S, T> for DspVec<S, T, N, D> where D: TimeDomain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToFreqResult, DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: FrequencyDomainOperations<S, T>, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: ComplexOps<T>, | [src] |
Prepares an argument to be used for convolution. Preparing an argument includes two steps: Read more
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 more
impl<S, T, N, D, O, NO, DO> ElementaryOps<O, T, NO, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: NumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + Index<RangeFull, Output = [T]> + GetMetaData<T, NO, DO>, S: ToSliceMut<T>, T: RealNumber, | [src] |
Calculates the sum of self + summand
. It consumes self and returns the result. # Failures TransRes may report the following ErrorReason
members: Read more
Calculates the difference of self - subtrahend
. It consumes self and returns the result. # Failures TransRes may report the following ErrorReason
members: Read more
Calculates the product of self * factor
. It consumes self and returns the result. # Failures TransRes may report the following ErrorReason
members: Read more
Calculates the quotient of self / summand
. It consumes self and returns the result. # Failures TransRes may report the following ErrorReason
members: Read more
impl<S, T, N, D> GetMetaData<T, N, D> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Gets a copy of the vector meta data. This can be used to create new types with the same meta data. Read more
impl<S, O, T, N, D, NO, DO> PreciseDotProductOps<O, T, T, NO, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: RealNumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = Result<T, ErrorReason>
Calculates the dot product of self and factor using a more precise but slower algorithm. Self and factor remain unchanged. Read more
impl<S, O, T, N, D, NO, DO> PreciseDotProductOps<O, Complex<T>, T, NO, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: ComplexNumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D> InterpolationOps<S, T> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T> + ToComplexVector<S, T> + ToDspVector<T>, T: RealNumber, DspVec<S, T, N, D>: InsertZerosOpsBuffered<S, T>, DspVec<S, T, N, D>: ScaleOps<T>, DspVec<S, T, N, D>: ResizeBufferedOps<S, T>, | [src] |
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 more
Interpolates self
with the convolution function function
by the integer value interpolation_factor
. InterpolationOps is done in in frequency domain. Read more
Interpolates the signal in frequency domain by padding it with zeros. This function preserves the shape of the signal in frequency domain. Read more
Interpolates the signal in frequency domain by padding it with zeros.
Decimates or downsamples self
. decimatei
is the inverse function to interpolatei
.
Converts the real vector into a complex vector. Read more
impl<S, O, T, N, D, NO, DO> DotProductOps<O, Complex<T>, T, NO, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: ComplexNumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, O, T, N, D, NO, DO> DotProductOps<O, T, T, NO, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: RealNumberSpace, NO: PosEq<N> + NumberSpace, O: Vector<T> + GetMetaData<T, NO, DO> + Index<RangeFull, Output = [T]>, S: ToSlice<T>, T: RealNumber, | [src] |
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 D: TimeDomain, DO: TimeDomain, N: NumberSpace, NO: PosEq<N> + NumberSpace, S: ToSliceMut<T>, SO: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: TimeToFrequencyDomainOperations<S, T>, DspVec<S, T, N, D>: Clone, DspVec<SO, T, N, D>: TimeToFrequencyDomainOperations<SO, T>, DspVec<SO, T, N, D>: Clone, | [src] |
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 more
impl<S, T, N, NR, D, O, DO> ComplexToRealSetterOps<O, T, NR, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: ComplexNumberSpace, NR: RealNumberSpace, O: Index<Range<usize>, Output = [T]> + Vector<T> + GetMetaData<T, NR, DO>, S: ToSliceMut<T> + Resize, T: RealNumber, DspVec<S, T, N, D>: ToRealResult, | [src] |
Overrides the self
vectors data with the real and imaginary data in the given vectors. real
and imag
must have the same size. Read more
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 more
impl<S, T, N, D> Vector<T> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
The x-axis delta. If domain
is time domain then delta
is in [s]
, in frequency domain delta
is in [Hz]
. Read more
Sets the x-axis delta. If domain
is time domain then delta
is in [s]
, in frequency domain delta
is in [Hz]
. Read more
The number of valid elements in the vector. This can be changed with the Resize
trait. Read more
Indicates whether or not the vector is empty.
The number of valid points. If the vector 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
Gets the multi core settings which determine how the work is split between several cores if the amount of data gets larger. Read more
Sets the multi core settings which determine how the work is split between several cores if the amount of data gets larger. Read more
Gets the number of allocated elements in the underlying vector. The allocated length may be larger than the length of valid points. In most cases you likely want to have len
or points
instead. Read more
impl<S, T, N, D> SymmetricTimeToFrequencyDomainOperations<S, T> for DspVec<S, T, N, D> where D: TimeDomain, N: RealNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToFreqResult, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: RededicateForceOps<DspVec<S, T, N, D>>, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: FrequencyDomainOperations<S, T>, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: ResizeOps, | [src] |
fn plain_sfft<B>( self, buffer: &mut B ) -> Result<<DspVec<S, T, N, D> as ToFreqResult>::FreqResult, (ErrorReason, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult)> where B: Buffer<'a, S, T>, | [src] |
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 more
fn sfft<B>( self, buffer: &mut B ) -> Result<<DspVec<S, T, N, D> as ToFreqResult>::FreqResult, (ErrorReason, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult)> where B: Buffer<'a, S, T>, | [src] |
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. # Failures TransRes may report the following ErrorReason
members: Read more
fn windowed_sfft<B>( self, buffer: &mut B, window: &dyn WindowFunction<T> ) -> Result<<DspVec<S, T, N, D> as ToFreqResult>::FreqResult, (ErrorReason, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult)> where B: Buffer<'a, S, T>, | [src] |
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. # Failures TransRes may report the following ErrorReason
members: Read more
impl<S, T, N, D, O> RededicateToOps<O> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, O: Vector<T> + RededicateOps<DspVec<S, T, N, D>>, S: ToSlice<T>, T: RealNumber, | [src] |
Converts Self
inot Other
.
impl<S, T, N, D> ComplexIndexMut<Range<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
The method for complex indexing
impl<S, T, N, D> ComplexIndexMut<usize> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
The method for complex indexing
impl<S, T, N, D> ComplexIndexMut<RangeFull> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
The method for complex indexing
impl<S, T, N, D> ComplexIndexMut<RangeFrom<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
The method for complex indexing
impl<S, T, N, D> ComplexIndexMut<RangeTo<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
The method for complex indexing
impl<S, T, N, D> RededicateForceOps<DspVec<S, T, N, D>> for DspVec<S, T, Real, Freq> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Make Other
a Self
without performing any checks.
Make Other
a Self
without performing any checks. Read more
impl<S, T, N, D> RededicateForceOps<DspVec<S, T, N, D>> for DspVec<S, T, RealOrComplex, TimeOrFreq> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Make Other
a Self
without performing any checks.
Make Other
a Self
without performing any checks. Read more
impl<S, T, N, D> RededicateForceOps<DspVec<S, T, N, D>> for DspVec<S, T, Complex, Time> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Make Other
a Self
without performing any checks.
Make Other
a Self
without performing any checks. Read more
impl<S, T, N, D> RededicateForceOps<DspVec<S, T, N, D>> for DspVec<S, T, Complex, Freq> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Make Other
a Self
without performing any checks.
Make Other
a Self
without performing any checks. Read more
impl<S, T, N, D> RededicateForceOps<DspVec<S, T, N, D>> for DspVec<S, T, Real, Time> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
Make Other
a Self
without performing any checks.
Make Other
a Self
without performing any checks. Read more
impl<S, T, N, D> ComplexIndex<RangeTo<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D> ComplexIndex<Range<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D> ComplexIndex<RangeFrom<usize>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D> ComplexIndex<RangeFull> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D> ComplexIndex<usize> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
impl<S, T, N, D, R> MapAggregateOps<T, R> for DspVec<S, T, N, D> where D: Domain, N: RealNumberSpace, R: Send, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = Result<R, ErrorReason>
fn map_aggregate<'a, A, FMap, FAggr>( &self, argument: A, map: &FMap, aggregate: &FAggr ) -> Result<R, ErrorReason> where A: Sync + Copy + Send, FAggr: Fn(R, R) -> R + 'a + Sync + Send, FMap: Fn(T, usize, A) -> R + 'a + Sync, | [src] |
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 more
impl<S, T, N, D, R> MapAggregateOps<Complex<T>, R> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, R: Send, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = Result<R, ErrorReason>
fn map_aggregate<'a, A, FMap, FAggr>( &self, argument: A, map: &FMap, aggregate: &FAggr ) -> Result<R, ErrorReason> where A: Sync + Copy + Send, FAggr: Fn(R, R) -> R + 'a + Sync + Send, FMap: Fn(Complex<T>, usize, A) -> R + 'a + Sync, | [src] |
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 more
impl<S, T, N, D> Clone for DspVec<S, T, N, D> where D: Domain + Clone, N: NumberSpace + Clone, S: ToSlice<T> + Clone, T: RealNumber, | [src] |
Performs copy-assignment from source
. Read more
impl<S, T, N, D> FrequencyToTimeDomainOperations<S, T> for DspVec<S, T, N, D> where D: FrequencyDomain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToTimeResult, <DspVec<S, T, N, D> as ToTimeResult>::TimeResult: RededicateForceOps<DspVec<S, T, N, D>>, <DspVec<S, T, N, D> as ToTimeResult>::TimeResult: TimeDomainOperations<S, T>, | [src] |
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector into a time domain vector. Read more
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector into a time domain vector. # Example Read more
Performs an Inverse Fast Fourier Transformation transforming a frequency domain vector into a time domain vector and removes the FFT window. Read more
impl<S, T, N, D> ApproximatedOps<T> for DspVec<S, T, N, D> where D: Domain, N: RealNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Computes the principal value approximation of natural logarithm of every element in the vector. Read more
Calculates the natural exponential approximation for every vector element. Read more
Calculates the sine approximation of each element in radians. Read more
Calculates the cosine approximation of each element in radians Read more
Calculates the approximated logarithm to the given base for every vector element. Read more
Calculates the approximated exponential to the given base for every vector element. Read more
Raises every vector element to approximately a floating point power. Read more
impl<S, T, N, D> TimeDomainOperations<S, T> for DspVec<S, T, N, D> where D: TimeDomain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToFreqResult, <DspVec<S, T, N, D> as ToFreqResult>::FreqResult: RededicateForceOps<DspVec<S, T, N, D>>, | [src] |
Applies a window to the data vector.
Removes a window from the data vector.
impl<S, T, N, D> ModuloOps<T> for DspVec<S, T, N, D> where D: Domain, N: RealNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Each value in the vector is dividable by the divisor and the remainder is stored in the resulting vector. This the same a modulo operation or to phase wrapping. Read more
This function corrects the jumps in the given vector which occur due to wrap or modulo operations. This will undo a wrap operation only if the deltas are smaller than half the divisor. Read more
Calculates the sum of the data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the squared data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the squared data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the squared data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the data contained in the vector using a more precise but slower algorithm. # Example Read more
Calculates the sum of the squared data contained in the vector using a more precise but slower algorithm. # Example Read more
type Result = ArrayVec<[Statistics<Complex<f64>>; 16]>
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 more
type Result = ArrayVec<[Statistics<Complex<f64>>; 16]>
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 more
type Result = ArrayVec<[Statistics<f64>; 16]>
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 more
type Result = ArrayVec<[Statistics<f64>; 16]>
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 more
type Result = Statistics<f64>
Calculates the statistics of the data contained in the vector using a more precise but slower algorithm. Read more
type Result = Statistics<f64>
Calculates the statistics of the data contained in the vector using a more precise but slower algorithm. Read more
impl<S, T, N, D> MergeOps for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Merges several vectors into self
. All vectors must have the same size and at least one vector must be provided. # Failures TransRes may report the following ErrorReason
members: Read more
impl<S, T, N, D> OffsetOps<Complex<T>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Adds a scalar to each vector element. Read more
impl<S, T, N, D> OffsetOps<T> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Adds a scalar to each vector element. Read more
impl<S, T, N, D> FrequencyDomainOperations<S, T> for DspVec<S, T, N, D> where D: FrequencyDomain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToTimeResult, <DspVec<S, T, N, D> as ToTimeResult>::TimeResult: RededicateForceOps<DspVec<S, T, N, D>>, | [src] |
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
Swaps vector halves after a Fourier Transformation.
Swaps vector halves before an Inverse Fourier Transformation.
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] |
Convolves self
with the convolution function impulse_response
. For performance consider to to use FrequencyMultiplication
instead of this operation depending on len
. Read more
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] |
Convolves self
with the convolution function impulse_response
. For performance consider to to use FrequencyMultiplication
instead of this operation depending on len
. Read more
impl<S, T, N, D> ResizeBufferedOps<S, T> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Changes self.len()
. If self.is_complex()
is true then len
must be an even number. len > self.alloc_len()
is only possible if the underlying storage or the buffer supports resizing. Read more
impl<S, T, N, D> TrigOps for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Calculates the sine of each element in radians. Read more
Calculates the cosine of each element in radians. Read more
Calculates the tangent of each element in radians.
Calculates the principal value of the inverse sine of each element in radians.
Calculates the principal value of the inverse cosine of each element in radians.
Calculates the principal value of the inverse tangent of each element in radians.
Calculates the hyperbolic sine each element in radians.
Calculates the hyperbolic cosine each element in radians.
Calculates the hyperbolic tangent each element in radians.
Calculates the principal value of the inverse hyperbolic sine of each element in radians.
Calculates the principal value of the inverse hyperbolic cosine of each element in radians.
Calculates the principal value of the inverse hyperbolic tangent of each element in radians. Read more
impl<S, T, N, NR, D, O, DO> ComplexToRealGetterOps<O, T, NR, DO> for DspVec<S, T, N, D> where D: Domain, DO: PosEq<D> + Domain, N: ComplexNumberSpace, NR: RealNumberSpace, O: Vector<T> + GetMetaData<T, NR, DO> + Index<Range<usize>, Output = [T]> + IndexMut<Range<usize>>, S: ToSlice<T>, T: RealNumber, DspVec<S, T, N, D>: ToRealResult, | [src] |
Copies all real elements into the given vector. # Example Read more
Copies all imag elements into the given vector. # Example Read more
Copies the absolute value or magnitude of all vector elements into the given target vector. # Example Read more
Copies the absolute value squared or magnitude squared of all vector elements into the given target vector. # Example Read more
Copies the phase of all elements in [rad] into the given vector. # Example Read more
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 more
Gets the magnitude and phase and stores them in the given vectors. See also get_real
and get_imag
for further information. Read more
impl<S, T, N, D> ComplexToRealTransformsOpsBuffered<S, T> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToRealResult, <DspVec<S, T, N, D> as ToRealResult>::RealResult: RededicateForceOps<DspVec<S, T, N, D>>, | [src] |
Gets the absolute value, magnitude or norm of all vector elements. # Example Read more
Gets the square root of the absolute value of all vector elements. # Example Read more
Gets the phase of all elements in [rad]. # Example Read more
impl<S, T, N, D, O> RededicateOps<O> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, O: Vector<T>, S: ToSlice<T>, T: RealNumber, DspVec<S, T, N, D>: RededicateForceOps<O>, | [src] |
impl<S, T, N, D> IndexMut<Range<usize>> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Performs the mutable indexing (container[index]
) operation.
impl<S, T, N, D> IndexMut<RangeFull> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Performs the mutable indexing (container[index]
) operation.
impl<S, T, N, D> IndexMut<usize> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Performs the mutable indexing (container[index]
) operation.
impl<S, T, N, D> IndexMut<RangeTo<usize>> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Performs the mutable indexing (container[index]
) operation.
impl<S, T, N, D> IndexMut<RangeFrom<usize>> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Performs the mutable indexing (container[index]
) operation.
impl<S, T, N, D> ComplexToRealTransformsOps<T> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToRealResult, <DspVec<S, T, N, D> as ToRealResult>::RealResult: RededicateForceOps<DspVec<S, T, N, D>>, | [src] |
Gets the absolute value, magnitude or norm of all vector elements. # Example Read more
Gets the square root of the absolute value of all vector elements. # Example Read more
Gets the phase of all elements in [rad]. # Example Read more
impl<S, T, N, D> MapInplaceOps<T> for DspVec<S, T, N, D> where D: Domain, N: RealNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Transforms all vector elements using the function map
.
impl<S, T, N, D> MapInplaceOps<Complex<T>> for DspVec<S, T, N, D> where D: Domain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Transforms all vector elements using the function map
.
impl<S, T, N, D> SymmetricFrequencyToTimeDomainOperations<S, T> for DspVec<S, T, N, D> where D: FrequencyDomain, N: ComplexNumberSpace, S: ToSliceMut<T>, T: RealNumber, DspVec<S, T, N, D>: ToRealTimeResult, DspVec<S, T, N, D>: ToTimeResult, DspVec<S, T, N, D>: FrequencyDomainOperations<S, T>, <DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult: RededicateForceOps<DspVec<S, T, N, D>>, <DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult: TimeDomainOperations<S, T>, | [src] |
fn plain_sifft<B>( self, buffer: &mut B ) -> Result<<DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult)> where B: Buffer<'a, S, T>, | [src] |
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 more
fn sifft<B>( self, buffer: &mut B ) -> Result<<DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult)> where B: Buffer<'a, S, T>, | [src] |
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 more
fn windowed_sifft<B>( self, buffer: &mut B, window: &dyn WindowFunction<T> ) -> Result<<DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult, (ErrorReason, <DspVec<S, T, N, D> as ToRealTimeResult>::RealTimeResult)> where B: Buffer<'a, S, T>, | [src] |
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 more
impl<S, T, N, D> DiffSumOps for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Calculates the delta of each elements to its previous element. This will decrease the vector length by one point. Read more
Calculates the delta of each elements to its previous element. The first element will remain unchanged. Read more
Calculates the cumulative sum of all elements. This operation undoes the diff_with_start
operation. Read more
impl<S, T, N, D> FromVector<T> for DspVec<S, T, N, D> where D: Domain, N: NumberSpace, S: ToSlice<T>, T: RealNumber, | [src] |
type Output = S
Type of the underlying storage of a vector.
Gets the underlying storage and the number of elements which contain valid. Read more
Gets the underlying slice of a vector.
impl<S, T, N, D> RealOps for DspVec<S, T, N, D> where D: Domain, N: RealNumberSpace, S: ToSliceMut<T>, T: RealNumber, | [src] |
Gets the absolute value of all vector elements. # Example Read more
type Owned = T
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
type Error = !
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static