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

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§

source

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!([Complex::new(1.0, 0.0), Complex::new(2.0, 0.0)], result[..]);

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S, T, N, D> RealToComplexTransformsOpsBuffered<S, T> for DspVec<S, T, N, D>