Trait basic_dsp_vector::RealToComplexTransformsOpsBuffered [] [src]

pub trait RealToComplexTransformsOpsBuffered<S, T>: ToComplexResult where
    S: ToSliceMut<T>,
    T: RealNumber
{ fn to_complex_b<B>(self, buffer: &mut B) -> Self::ComplexResult
    where
        B: for<'a> Buffer<'a, S, T>
; }

Defines transformations from real to complex number space.

Failures

All operations in this trait set self.len() to 0 if the type isn't in the real number space.

Required Methods

Converts the real vector into a complex vector. The buffer allows this operation to succeed even if the storage type doesn't allow resizing.

Example

use basic_dsp_vector::*;
let vector = vec!(1.0, 2.0).to_real_time_vec();
let mut buffer = SingleBuffer::new();
let result = vector.to_complex_b(&mut buffer);
assert_eq!([1.0, 0.0, 2.0, 0.0], result[..]);

Implementors