Struct basic_dsp::RealFreqVector
[−]
[src]
pub struct RealFreqVector<T> where T: RealNumber {
// some fields omitted
}A 1xN (one times N elements) or Nx1 data vector as used for most digital signal processing (DSP) operations. All data vector operations consume the vector they operate on and return a new vector. A consumed vector must not be accessed again.
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 DataVector32 and DataVector64 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.
Methods
impl<T> RealFreqVector<T> where T: RealNumber[src]
fn from_array_no_copy_with_options(data: Vec<T>, options: MultiCoreSettings) -> Self
Same as from_array_no_copy but also allows to set multicore options.
fn from_array_with_options(data: &[T], options: MultiCoreSettings) -> Self
Same as from_array but also allows to set multicore options.
fn from_array_with_delta_and_options(data: &[T], delta: T, options: MultiCoreSettings) -> Self
Same as from_array_with_delta but also allows to set multicore options.
fn empty_with_options(options: MultiCoreSettings) -> Self
Same as empty but also allows to set multicore options.
fn empty_with_delta_and_options(delta: T, options: MultiCoreSettings) -> Self
Same as empty_with_delta but also allows to set multicore options.
fn from_constant_with_options(constant: T, length: usize, options: MultiCoreSettings) -> Self
Same as from_constant but also allows to set multicore options.
fn from_constant_with_delta_and_options(constant: T, length: usize, delta: T, options: MultiCoreSettings) -> Self
Same as from_constant_with_delta but also allows to set multicore options.
fn from_array_no_copy(data: Vec<T>) -> Self
Creates a real DataVector by consuming a Vec.
This operation is more memory efficient than the other options to create a vector, however if used outside of Rust then it holds the risk that the user will access the data parameter after the vector has been created causing all types of issues.
fn from_array(data: &[T]) -> Self
Creates a real DataVector from an array or sequence. delta is defaulted to 1.
fn from_array_with_delta(data: &[T], delta: T) -> Self
Creates a real DataVector from an array or sequence and sets delta to the given value.
fn empty() -> Self
Creates a real and empty DataVector and sets delta to 1.0 value.
fn empty_with_delta(delta: T) -> Self
Creates a real and empty DataVector and sets delta to the given value.
fn from_constant(constant: T, length: usize) -> Self
Creates a real DataVector with length elements all set to the value of constant. delta is defaulted to 1.
fn from_constant_with_delta(constant: T, length: usize, delta: T) -> Self
Creates a real DataVector with length elements all set to the value of constant and sets delta to the given value.
Trait Implementations
impl<'a> FrequencyMultiplication<f32, &'a RealFrequencyResponse<f32>> for RealFreqVector<f32>[src]
fn multiply_frequency_response(self, function: &RealFrequencyResponse<f32>, ratio: f32) -> VecResult<Self>
Mutiplies self with the frequency response function frequency_response. Read more
impl<'a> FrequencyMultiplication<f64, &'a RealFrequencyResponse<f64>> for RealFreqVector<f64>[src]
fn multiply_frequency_response(self, function: &RealFrequencyResponse<f64>, ratio: f64) -> VecResult<Self>
Mutiplies self with the frequency response function frequency_response. Read more
impl VectorConvolution<f32> for RealFreqVector<f32>[src]
fn convolve_vector(self, other: &Self) -> VecResult<Self>
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. # Failures VecResult may report the following ErrorReason members: Read more
impl VectorConvolution<f64> for RealFreqVector<f64>[src]
fn convolve_vector(self, other: &Self) -> VecResult<Self>
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. # Failures VecResult may report the following ErrorReason members: Read more
impl Interpolation<f32> for RealFreqVector<f32>[src]
fn interpolatef(self, function: &RealImpulseResponse<f32>, interpolation_factor: f32, delay: f32, len: usize) -> VecResult<Self>
Interpolates self with the convolution function function by the real value interpolation_factor. Interpolation is done in 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
fn interpolatei(self, function: &RealFrequencyResponse<f32>, interpolation_factor: u32) -> VecResult<Self>
Interpolates self with the convolution function function by the interger value interpolation_factor. Interpolation is done in in frequency domain. Read more
fn decimatei(self, decimation_factor: u32, delay: u32) -> VecResult<Self>
Decimates or downsamples self. decimatei is the inverse function to interpolatei.
impl Interpolation<f64> for RealFreqVector<f64>[src]
fn interpolatef(self, function: &RealImpulseResponse<f64>, interpolation_factor: f64, delay: f64, len: usize) -> VecResult<Self>
Interpolates self with the convolution function function by the real value interpolation_factor. Interpolation is done in 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
fn interpolatei(self, function: &RealFrequencyResponse<f64>, interpolation_factor: u32) -> VecResult<Self>
Interpolates self with the convolution function function by the interger value interpolation_factor. Interpolation is done in in frequency domain. Read more
fn decimatei(self, decimation_factor: u32, delay: u32) -> VecResult<Self>
Decimates or downsamples self. decimatei is the inverse function to interpolatei.
impl RealInterpolation<f32> for RealFreqVector<f32>[src]
fn interpolate_lin(self, interpolation_factor: f32, delay: f32) -> VecResult<Self>
Linear interpolation between samples. # Unstable This operation and interpolate_hermite might be merged into one function with an additional argument in future. Read more
fn interpolate_hermite(self, interpolation_factor: f32, delay: f32) -> VecResult<Self>
Piecewise cubic hermite interpolation between samples. # Unstable Algorithm might need to be revised. This operation and interpolate_lin might be merged into one function with an additional argument in future. Read more
impl RealInterpolation<f64> for RealFreqVector<f64>[src]
fn interpolate_lin(self, interpolation_factor: f64, delay: f64) -> VecResult<Self>
Linear interpolation between samples. # Unstable This operation and interpolate_hermite might be merged into one function with an additional argument in future. Read more
fn interpolate_hermite(self, interpolation_factor: f64, delay: f64) -> VecResult<Self>
Piecewise cubic hermite interpolation between samples. # Unstable Algorithm might need to be revised. This operation and interpolate_lin might be merged into one function with an additional argument in future. Read more
impl<T: Debug> Debug for RealFreqVector<T> where T: RealNumber[src]
impl<T> DataVector<T> for RealFreqVector<T> where T: RealNumber[src]
fn len(&self) -> usize
The number of valid elements in the the vector.
fn set_len(&mut self, len: usize)
Sets the vector length to the given length. If self.len() < len then the value of the new elements is undefined. Read more
fn allocated_len(&self) -> usize
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 lenor points instead. Read more
fn data(&self) -> &[T]
Gives direct access to the underlying data sequence. It's recommended to use the `Index functions . For users outside of Rust: It's discouraged to hold references to this array while executing operations on the vector, since the vector may decide at any operation to invalidate the array. Read more
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].
fn domain(&self) -> DataVectorDomain
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
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
fn points(&self) -> usize
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
impl<T> RededicateVector<T> for RealFreqVector<T> where T: RealNumber[src]
fn rededicate_as_complex_time_vector(self, delta: T) -> ComplexTimeVector<T>
Make self a complex time vector # Example Read more
fn rededicate_as_complex_freq_vector(self, delta: T) -> ComplexFreqVector<T>
Make self a complex frequency vector
fn rededicate_as_real_time_vector(self, delta: T) -> RealTimeVector<T>
Make self a real time vector
fn rededicate_as_real_freq_vector(self, delta: T) -> RealFreqVector<T>
Make self a real freq vector
fn rededicate_as_generic_vector(self, is_complex: bool, domain: DataVectorDomain, delta: T) -> GenericDataVector<T>
Make self a generic vector
impl<T> Index<usize> for RealFreqVector<T> where T: RealNumber[src]
type Output = T
The returned type after indexing
fn index(&self, index: usize) -> &T
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<usize> for RealFreqVector<T> where T: RealNumber[src]
impl<T> Index<Range<usize>> for RealFreqVector<T> where T: RealNumber[src]
type Output = [T]
The returned type after indexing
fn index(&self, index: Range<usize>) -> &[T]
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<Range<usize>> for RealFreqVector<T> where T: RealNumber[src]
fn index_mut(&mut self, index: Range<usize>) -> &mut [T]
The method for the indexing (Foo[Bar]) operation
impl<T> Index<RangeFrom<usize>> for RealFreqVector<T> where T: RealNumber[src]
type Output = [T]
The returned type after indexing
fn index(&self, index: RangeFrom<usize>) -> &[T]
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<RangeFrom<usize>> for RealFreqVector<T> where T: RealNumber[src]
fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut [T]
The method for the indexing (Foo[Bar]) operation
impl<T> Index<RangeTo<usize>> for RealFreqVector<T> where T: RealNumber[src]
type Output = [T]
The returned type after indexing
fn index(&self, index: RangeTo<usize>) -> &[T]
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<RangeTo<usize>> for RealFreqVector<T> where T: RealNumber[src]
fn index_mut(&mut self, index: RangeTo<usize>) -> &mut [T]
The method for the indexing (Foo[Bar]) operation
impl<T> Index<RangeFull> for RealFreqVector<T> where T: RealNumber[src]
type Output = [T]
The returned type after indexing
fn index(&self, index: RangeFull) -> &[T]
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<RangeFull> for RealFreqVector<T> where T: RealNumber[src]
fn index_mut(&mut self, index: RangeFull) -> &mut [T]
The method for the indexing (Foo[Bar]) operation
impl<T> Clone for RealFreqVector<T> where T: RealNumber[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
impl GenericVectorOperations<f32> for RealFreqVector<f32>[src]
fn add_vector(self, summand: &Self) -> VecResult<Self>
Calculates the sum of self + summand. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn add_smaller_vector(self, summand: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn subtract_vector(self, subtrahend: &Self) -> VecResult<Self>
Calculates the difference of self - subtrahend. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn subtract_smaller_vector(self, subtrahend: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn multiply_vector(self, factor: &Self) -> VecResult<Self>
Calculates the product of self * factor. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn multiply_smaller_vector(self, factor: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn divide_vector(self, divisor: &Self) -> VecResult<Self>
Calculates the quotient of self / summand. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn divide_smaller_vector(self, divisor: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn zero_pad(self, points: usize, option: PaddingOption) -> VecResult<Self>
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. Read more
fn reverse(self) -> VecResult<Self>
Reverses the data inside the vector.
fn zero_interleave(self, factor: u32) -> VecResult<Self>
Ineterleaves zeros factor - 1times after every vector element, so that the resulting vector will have a length of self.len() * factor. Read more
fn diff(self) -> VecResult<Self>
Calculates the delta of each elements to its previous element. This will decrease the vector length by one point. Read more
fn diff_with_start(self) -> VecResult<Self>
Calculates the delta of each elements to its previous element. The first element will remain unchanged. Read more
fn cum_sum(self) -> VecResult<Self>
Calculates the cumulative sum of all elements. This operation undoes the diff_with_startoperation. Read more
fn sqrt(self) -> VecResult<Self>
Gets the square root of all vector elements. Read more
fn square(self) -> VecResult<Self>
Squares all vector elements. Read more
fn root(self, degree: f32) -> VecResult<Self>
Calculates the n-th root of every vector element. Read more
fn power(self, exponent: f32) -> VecResult<Self>
Raises every vector element to the given power. Read more
fn logn(self) -> VecResult<Self>
Calculates the natural logarithm to the base e for every vector element. Read more
fn expn(self) -> VecResult<Self>
Calculates the natural exponential to the base e for every vector element. Read more
fn log_base(self, base: f32) -> VecResult<Self>
Calculates the logarithm to the given base for every vector element. Read more
fn sin(self) -> VecResult<Self>
Calculates the sine of each element in radians. Read more
fn cos(self) -> VecResult<Self>
Calculates the cosine of each element in radians. Read more
fn tan(self) -> VecResult<Self>
Calculates the tangent of each element in radians.
fn asin(self) -> VecResult<Self>
Calculates the principal value of the inverse sine of each element in radians.
fn acos(self) -> VecResult<Self>
Calculates the principal value of the inverse cosine of each element in radians.
fn atan(self) -> VecResult<Self>
Calculates the principal value of the inverse tangent of each element in radians.
fn sinh(self) -> VecResult<Self>
Calculates the hyperbolic sine each element in radians.
fn cosh(self) -> VecResult<Self>
Calculates the hyperbolic cosine each element in radians.
fn tanh(self) -> VecResult<Self>
Calculates the hyperbolic tangent each element in radians.
fn asinh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic sine of each element in radians.
fn acosh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic cosine of each element in radians.
fn atanh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic tangent of each element in radians.
fn swap_halves(self) -> VecResult<Self>
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
fn exp_base(self, base: f32) -> VecResult<Self>
Calculates the exponential to the given base for every vector element. Read more
fn override_data(self, data: &[f32]) -> VecResult<Self>
Overrides the data in the vector with the given data. This may also change the vectors length (however not the allocated length). Read more
fn split_into(&self, targets: &mut [Box<Self>]) -> VoidResult
Splits the vector into several smaller vectors. self.len() must be dividable by targets.len() without a remainder and this conidition must be true too targets.len() > 0. # Failures VecResult may report the following ErrorReason members: Read more
fn merge(self, sources: &[Box<Self>]) -> VecResult<Self>
Merges several vectors into self. All vectors must have the same size and at least one vector must be provided. # Failures VecResult may report the following ErrorReason members: Read more
impl GenericVectorOperations<f64> for RealFreqVector<f64>[src]
fn add_vector(self, summand: &Self) -> VecResult<Self>
Calculates the sum of self + summand. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn add_smaller_vector(self, summand: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn subtract_vector(self, subtrahend: &Self) -> VecResult<Self>
Calculates the difference of self - subtrahend. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn subtract_smaller_vector(self, subtrahend: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn multiply_vector(self, factor: &Self) -> VecResult<Self>
Calculates the product of self * factor. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn multiply_smaller_vector(self, factor: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn divide_vector(self, divisor: &Self) -> VecResult<Self>
Calculates the quotient of self / summand. It consumes self and returns the result. # Failures VecResult may report the following ErrorReason members: Read more
fn divide_smaller_vector(self, divisor: &Self) -> VecResult<Self>
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 VecResult may report the following ErrorReason members: Read more
fn zero_pad(self, points: usize, option: PaddingOption) -> VecResult<Self>
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. Read more
fn reverse(self) -> VecResult<Self>
Reverses the data inside the vector.
fn zero_interleave(self, factor: u32) -> VecResult<Self>
Ineterleaves zeros factor - 1times after every vector element, so that the resulting vector will have a length of self.len() * factor. Read more
fn diff(self) -> VecResult<Self>
Calculates the delta of each elements to its previous element. This will decrease the vector length by one point. Read more
fn diff_with_start(self) -> VecResult<Self>
Calculates the delta of each elements to its previous element. The first element will remain unchanged. Read more
fn cum_sum(self) -> VecResult<Self>
Calculates the cumulative sum of all elements. This operation undoes the diff_with_startoperation. Read more
fn sqrt(self) -> VecResult<Self>
Gets the square root of all vector elements. Read more
fn square(self) -> VecResult<Self>
Squares all vector elements. Read more
fn root(self, degree: f64) -> VecResult<Self>
Calculates the n-th root of every vector element. Read more
fn power(self, exponent: f64) -> VecResult<Self>
Raises every vector element to the given power. Read more
fn logn(self) -> VecResult<Self>
Calculates the natural logarithm to the base e for every vector element. Read more
fn expn(self) -> VecResult<Self>
Calculates the natural exponential to the base e for every vector element. Read more
fn log_base(self, base: f64) -> VecResult<Self>
Calculates the logarithm to the given base for every vector element. Read more
fn sin(self) -> VecResult<Self>
Calculates the sine of each element in radians. Read more
fn cos(self) -> VecResult<Self>
Calculates the cosine of each element in radians. Read more
fn tan(self) -> VecResult<Self>
Calculates the tangent of each element in radians.
fn asin(self) -> VecResult<Self>
Calculates the principal value of the inverse sine of each element in radians.
fn acos(self) -> VecResult<Self>
Calculates the principal value of the inverse cosine of each element in radians.
fn atan(self) -> VecResult<Self>
Calculates the principal value of the inverse tangent of each element in radians.
fn sinh(self) -> VecResult<Self>
Calculates the hyperbolic sine each element in radians.
fn cosh(self) -> VecResult<Self>
Calculates the hyperbolic cosine each element in radians.
fn tanh(self) -> VecResult<Self>
Calculates the hyperbolic tangent each element in radians.
fn asinh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic sine of each element in radians.
fn acosh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic cosine of each element in radians.
fn atanh(self) -> VecResult<Self>
Calculates the principal value of the inverse hyperbolic tangent of each element in radians.
fn swap_halves(self) -> VecResult<Self>
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
fn exp_base(self, base: f64) -> VecResult<Self>
Calculates the exponential to the given base for every vector element. Read more
fn override_data(self, data: &[f64]) -> VecResult<Self>
Overrides the data in the vector with the given data. This may also change the vectors length (however not the allocated length). Read more
fn split_into(&self, targets: &mut [Box<Self>]) -> VoidResult
Splits the vector into several smaller vectors. self.len() must be dividable by targets.len() without a remainder and this conidition must be true too targets.len() > 0. # Failures VecResult may report the following ErrorReason members: Read more
fn merge(self, sources: &[Box<Self>]) -> VecResult<Self>
Merges several vectors into self. All vectors must have the same size and at least one vector must be provided. # Failures VecResult may report the following ErrorReason members: Read more
impl RealVectorOperations<f32> for RealFreqVector<f32>[src]
type ComplexPartner = ComplexFreqVector<f32>
fn real_offset(self, offset: f32) -> VecResult<Self>
Adds a scalar to the vector. # Example Read more
fn real_scale(self, factor: f32) -> VecResult<Self>
Multiplies the vector with a scalar. # Example Read more
fn abs(self) -> VecResult<Self>
Gets the absolute value of all vector elements. # Example Read more
fn to_complex(self) -> VecResult<Self::ComplexPartner>
Converts the real vector into a complex vector. Read more
fn wrap(self, divisor: f32) -> VecResult<Self>
Each value in the vector is devided by the divisor and the remainder is stored in the resulting vector. This the same a modulo operation or to phase wrapping. Read more
fn unwrap(self, divisor: f32) -> VecResult<Self>
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
fn real_dot_product(&self, factor: &Self) -> ScalarResult<f32>
Calculates the dot product of self and factor. Self and factor remain unchanged. # Failures VecResult may report the following ErrorReason members: Read more
fn real_statistics(&self) -> Statistics<f32>
Calculates the statistics of the data contained in the vector. # Example Read more
fn real_statistics_splitted(&self, len: usize) -> Vec<Statistics<f32>>
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 devisable by len without a remainder, but this isn't enforced by the implementation. # Example Read more
impl Scale<f32> for RealFreqVector<f32>[src]
impl Offset<f32> for RealFreqVector<f32>[src]
impl RealVectorOperations<f64> for RealFreqVector<f64>[src]
type ComplexPartner = ComplexFreqVector<f64>
fn real_offset(self, offset: f64) -> VecResult<Self>
Adds a scalar to the vector. # Example Read more
fn real_scale(self, factor: f64) -> VecResult<Self>
Multiplies the vector with a scalar. # Example Read more
fn abs(self) -> VecResult<Self>
Gets the absolute value of all vector elements. # Example Read more
fn to_complex(self) -> VecResult<Self::ComplexPartner>
Converts the real vector into a complex vector. Read more
fn wrap(self, divisor: f64) -> VecResult<Self>
Each value in the vector is devided by the divisor and the remainder is stored in the resulting vector. This the same a modulo operation or to phase wrapping. Read more
fn unwrap(self, divisor: f64) -> VecResult<Self>
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
fn real_dot_product(&self, factor: &Self) -> ScalarResult<f64>
Calculates the dot product of self and factor. Self and factor remain unchanged. # Failures VecResult may report the following ErrorReason members: Read more
fn real_statistics(&self) -> Statistics<f64>
Calculates the statistics of the data contained in the vector. # Example Read more
fn real_statistics_splitted(&self, len: usize) -> Vec<Statistics<f64>>
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 devisable by len without a remainder, but this isn't enforced by the implementation. # Example Read more