[−][src]Trait basic_dsp_vector::RealOps
Operations on real types.
Failures
If one of the methods is called on complex data then self.len()
will be set to 0
.
To avoid this it's recommended to use the to_real_time_vec
, to_real_freq_vec
to_complex_time_vec
and to_complex_freq_vec
constructor methods since
the resulting types will already check at compile time (using the type system)
that the data is real.
Required methods
fn abs(&mut self)
Gets the absolute value of all vector elements.
Example
use basic_dsp_vector::*; let mut vector = vec!(1.0, -2.0).to_real_time_vec(); vector.abs(); assert_eq!([1.0, 2.0], vector[..]);
Implementors
impl<S, T, N, D> RealOps for DspVec<S, T, N, D> where
S: ToSliceMut<T>,
T: RealNumber,
N: RealNumberSpace,
D: Domain,
[src]
impl<S, T, N, D> RealOps for DspVec<S, T, N, D> where
S: ToSliceMut<T>,
T: RealNumber,
N: RealNumberSpace,
D: Domain,