[][src]Trait basic_dsp_vector::RealToComplexTransformsOpsBuffered

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

fn to_complex_b<B>(self, buffer: &mut B) -> Self::ComplexResult where
    B: for<'a> Buffer<'a, S, T>, 

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[..]);
Loading content...

Implementors

impl<S, T, N, D> RealToComplexTransformsOpsBuffered<S, T> for DspVec<S, T, N, D> where
    DspVec<S, T, N, D>: ToComplexResult + InsertZerosOpsBuffered<S, T>,
    <DspVec<S, T, N, D> as ToComplexResult>::ComplexResult: RededicateForceOps<DspVec<S, T, N, D>>,
    S: ToSliceMut<T>,
    T: RealNumber,
    N: RealNumberSpace,
    D: Domain
[src]

Loading content...