Trait rds_tensors::types::complex::Complex
[−]
[src]
pub trait Complex<T> where
Self: Sized + Copy, { fn cartesian(re: T, im: T) -> Self; fn polar(abs: T, arg: T) -> Self; fn re(self) -> T; fn im(self) -> T; fn abs(self) -> T; fn arg(self) -> T; fn conj(self) -> Self; fn reciprocal(self) -> Self; fn to_polar(self) -> (T, T) { ... } }
Trait defining basic operations on complex types.
Required Methods
fn cartesian(re: T, im: T) -> Self
Create a complex from a set of cartesian coordinates.
fn polar(abs: T, arg: T) -> Self
Create a complex from a set of polar coordinates.
fn re(self) -> T
Return the real part of the complex.
fn im(self) -> T
Return the imaginary part of the complex.
fn abs(self) -> T
Return the absolute value of the complex.
fn arg(self) -> T
Return the argument of the complex.
fn conj(self) -> Self
Return the conjugate value of the complex.
fn reciprocal(self) -> Self
Return the reciprocal value of the complex.