[−][src]Trait basic_dsp::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
D: Domain,
N: RealNumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
[src]
impl<S, T, N, D> RealOps for DspVec<S, T, N, D> where
D: Domain,
N: RealNumberSpace,
S: ToSliceMut<T>,
T: RealNumber,
impl<V, S, T> RealOps for Matrix2xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
[src]
impl<V, S, T> RealOps for Matrix2xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
impl<V, S, T> RealOps for Matrix3xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
[src]
impl<V, S, T> RealOps for Matrix3xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
impl<V, S, T> RealOps for Matrix4xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
[src]
impl<V, S, T> RealOps for Matrix4xN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
impl<V, S, T> RealOps for MatrixMxN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,
[src]
impl<V, S, T> RealOps for MatrixMxN<V, S, T> where
S: ToSlice<T>,
T: RealNumber,
V: Vector<T> + RealOps,