Trait basic_dsp_vector::ComplexToRealSetterOps
[−]
[src]
pub trait ComplexToRealSetterOps<T>: ToRealResult where T: RealNumber { fn set_real_imag(&mut self, real: &Self::RealResult, imag: &Self::RealResult) -> VoidResult; fn set_mag_phase(&mut self, mag: &Self::RealResult, phase: &Self::RealResult) -> VoidResult; }
Defines setters to create complex data from real data.
Failures
All operations in this trait set self.len() to 0 if the type isn't in
the complex number space.
Required Methods
fn set_real_imag(&mut self, real: &Self::RealResult, imag: &Self::RealResult) -> VoidResult
Overrides the self vectors data with the real and imaginary data in the given vectors.
real and imag must have the same size.
fn set_mag_phase(&mut self, mag: &Self::RealResult, phase: &Self::RealResult) -> VoidResult
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.
Implementors
impl<S, T, N, D> ComplexToRealSetterOps<T> for DspVec<S, T, N, D> where DspVec<S, T, N, D>: ToRealResult, DspVec<S, T, N, D>::RealResult: Index<Range<usize>, Output=[T]> + Vector<T>, S: ToSliceMut<T> + Owner + Resize, T: RealNumber, N: ComplexNumberSpace, D: Domain