pub trait RealToComplexTransformsOpsBuffered<S, T>: ToComplexResultwhere
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§
Sourcefn to_complex_b<B>(self, buffer: &mut B) -> Self::ComplexResultwhere
B: for<'a> Buffer<'a, S, T>,
fn to_complex_b<B>(self, buffer: &mut B) -> Self::ComplexResultwhere
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[..]);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.