Skip to main content

ComplexExt

Trait ComplexExt 

Source
pub trait ComplexExt<T, D: Dimension> {
    // Required methods
    fn abs(&self) -> Array<T, D>;
    fn imag(&self) -> Array<T, D>;
    fn real(&self) -> Array<T, D>;
    fn phase(&self) -> Array<T, D>;
    fn from_real_imag(
        real: Array<T, D>,
        imag: Array<T, D>,
    ) -> Array<Complex<T>, D>;
}
Expand description

Trait for converting between real and complex numbers.

This trait is implemented for both 1D and 2D arrays.

Required Methods§

Source

fn abs(&self) -> Array<T, D>

Source

fn imag(&self) -> Array<T, D>

Source

fn real(&self) -> Array<T, D>

Source

fn phase(&self) -> Array<T, D>

Source

fn from_real_imag(real: Array<T, D>, imag: Array<T, D>) -> Array<Complex<T>, D>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Float> ComplexExt<T, Dim<[usize; 1]>> for Array1<Complex<T>>

Implement the ComplexExt trait for 1D arrays.

Source§

impl<T: Float> ComplexExt<T, Dim<[usize; 2]>> for Array2<Complex<T>>

Implement the ComplexExt trait for 2D arrays.