Trait simba::scalar::ComplexField [−][src]
pub trait ComplexField: SubsetOf<Self> + SupersetOf<f64> + Field<Element = Self, SimdBool = bool> + Copy + Neg<Output = Self> + Send + Sync + Any + 'static + Debug + FromPrimitive + Display { type RealField: RealField;}Show methods
fn from_real(re: Self::RealField) -> Self; fn real(self) -> Self::RealField; fn imaginary(self) -> Self::RealField; fn modulus(self) -> Self::RealField; fn modulus_squared(self) -> Self::RealField; fn argument(self) -> Self::RealField; fn norm1(self) -> Self::RealField; fn scale(self, factor: Self::RealField) -> Self; fn unscale(self, factor: Self::RealField) -> Self; fn floor(self) -> Self; fn ceil(self) -> Self; fn round(self) -> Self; fn trunc(self) -> Self; fn fract(self) -> Self; fn mul_add(self, a: Self, b: Self) -> Self; fn abs(self) -> Self::RealField; fn hypot(self, other: Self) -> Self::RealField; fn recip(self) -> Self; fn conjugate(self) -> Self; fn sin(self) -> Self; fn cos(self) -> Self; fn sin_cos(self) -> (Self, Self); fn tan(self) -> Self; fn asin(self) -> Self; fn acos(self) -> Self; fn atan(self) -> Self; fn sinh(self) -> Self; fn cosh(self) -> Self; fn tanh(self) -> Self; fn asinh(self) -> Self; fn acosh(self) -> Self; fn atanh(self) -> Self; fn log(self, base: Self::RealField) -> Self; fn log2(self) -> Self; fn log10(self) -> Self; fn ln(self) -> Self; fn ln_1p(self) -> Self; fn sqrt(self) -> Self; fn exp(self) -> Self; fn exp2(self) -> Self; fn exp_m1(self) -> Self; fn powi(self, n: i32) -> Self; fn powf(self, n: Self::RealField) -> Self; fn powc(self, n: Self) -> Self; fn cbrt(self) -> Self; fn is_finite(&self) -> bool; fn try_sqrt(self) -> Option<Self>; fn to_polar(self) -> (Self::RealField, Self::RealField) { ... } fn to_exp(self) -> (Self::RealField, Self) { ... } fn signum(self) -> Self { ... } fn sinh_cosh(self) -> (Self, Self) { ... } fn sinc(self) -> Self { ... } fn sinhc(self) -> Self { ... } fn cosc(self) -> Self { ... } fn coshc(self) -> Self { ... }
Expand description
Trait shared by all complex fields and its subfields (like real numbers).
Complex numbers are equipped with functions that are commonly used on complex numbers and reals. The results of those functions only have to be approximately equal to the actual theoretical values.
Associated Types
Required methods
fn from_real(re: Self::RealField) -> Self
[src]
fn from_real(re: Self::RealField) -> Self
[src]Builds a pure-real complex number from the given value.
fn modulus_squared(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]The squared modulus of this complex number.
fn norm1(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]The sum of the absolute value of this complex number’s real and imaginary part.
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn abs(self) -> Self::RealField
[src]
fn abs(self) -> Self::RealField
[src]The absolute value of this complex number: self / self.signum()
.
This is equivalent to self.modulus()
.
fn hypot(self, other: Self) -> Self::RealField
[src]
fn hypot(self, other: Self) -> Self::RealField
[src]Computes (self.conjugate() * self + other.conjugate() * other).sqrt()
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn log(self, base: Self::RealField) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn powi(self, n: i32) -> Self
[src]
fn powf(self, n: Self::RealField) -> Self
[src]
fn powc(self, n: Self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
fn try_sqrt(self) -> Option<Self>
[src]
Provided methods
fn to_polar(self) -> (Self::RealField, Self::RealField)
[src]
fn to_polar(self) -> (Self::RealField, Self::RealField)
[src]The polar form of this complex number: (modulus, arg)
fn to_exp(self) -> (Self::RealField, Self)
[src]
fn to_exp(self) -> (Self::RealField, Self)
[src]The exponential form of this complex number: (modulus, e^{i arg})
fn sinh_cosh(self) -> (Self, Self)
[src]
fn sinhc(self) -> Self
[src]
fn coshc(self) -> Self
[src]
Implementations on Foreign Types
impl ComplexField for f32
[src]
impl ComplexField for f32
[src]type RealField = f32
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn to_exp(self) -> (Self, Self)
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn abs(self) -> Self
[src]
fn signum(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, n: i32) -> Self
[src]
fn powf(self, n: Self) -> Self
[src]
fn powc(self, n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, other: Self) -> Self::RealField
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
impl ComplexField for f64
[src]
impl ComplexField for f64
[src]type RealField = f64
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn to_exp(self) -> (Self, Self)
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn abs(self) -> Self
[src]
fn signum(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, n: i32) -> Self
[src]
fn powf(self, n: Self) -> Self
[src]
fn powc(self, n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, other: Self) -> Self::RealField
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
impl<N: RealField + PartialOrd> ComplexField for Complex<N>
[src]
impl<N: RealField + PartialOrd> ComplexField for Complex<N>
[src]fn ln(self) -> Self
[src]
fn ln(self) -> Self
[src]Computes the principal value of natural logarithm of self
.
This function has one branch cut:
(-∞, 0]
, continuous from above.
The branch satisfies -π ≤ arg(ln(z)) ≤ π
.
fn sqrt(self) -> Self
[src]
fn sqrt(self) -> Self
[src]Computes the principal value of the square root of self
.
This function has one branch cut:
(-∞, 0)
, continuous from above.
The branch satisfies -π/2 ≤ arg(sqrt(z)) ≤ π/2
.
fn asin(self) -> Self
[src]
fn asin(self) -> Self
[src]Computes the principal value of the inverse sine of self
.
This function has two branch cuts:
(-∞, -1)
, continuous from above.(1, ∞)
, continuous from below.
The branch satisfies -π/2 ≤ Re(asin(z)) ≤ π/2
.
fn acos(self) -> Self
[src]
fn acos(self) -> Self
[src]Computes the principal value of the inverse cosine of self
.
This function has two branch cuts:
(-∞, -1)
, continuous from above.(1, ∞)
, continuous from below.
The branch satisfies 0 ≤ Re(acos(z)) ≤ π
.
fn atan(self) -> Self
[src]
fn atan(self) -> Self
[src]Computes the principal value of the inverse tangent of self
.
This function has two branch cuts:
(-∞i, -i]
, continuous from the left.[i, ∞i)
, continuous from the right.
The branch satisfies -π/2 ≤ Re(atan(z)) ≤ π/2
.
fn asinh(self) -> Self
[src]
fn asinh(self) -> Self
[src]Computes the principal value of inverse hyperbolic sine of self
.
This function has two branch cuts:
(-∞i, -i)
, continuous from the left.(i, ∞i)
, continuous from the right.
The branch satisfies -π/2 ≤ Im(asinh(z)) ≤ π/2
.
fn acosh(self) -> Self
[src]
fn acosh(self) -> Self
[src]Computes the principal value of inverse hyperbolic cosine of self
.
This function has one branch cut:
(-∞, 1)
, continuous from above.
The branch satisfies -π ≤ Im(acosh(z)) ≤ π
and 0 ≤ Re(acosh(z)) < ∞
.
fn atanh(self) -> Self
[src]
fn atanh(self) -> Self
[src]Computes the principal value of inverse hyperbolic tangent of self
.
This function has two branch cuts:
(-∞, -1]
, continuous from above.[1, ∞)
, continuous from below.
The branch satisfies -π/2 ≤ Im(atanh(z)) ≤ π/2
.
type RealField = N
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn abs(self) -> Self::RealField
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn powi(self, n: i32) -> Self
[src]
fn is_finite(&self) -> bool
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn hypot(self, b: Self) -> Self::RealField
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh_cosh(self) -> (Self, Self)
[src]
Implementors
impl<Fract: Send + Sync + 'static> ComplexField for FixedI8<Fract> where
Fract: Unsigned + LeEqU8 + IsLessOrEqual<U7, Output = True> + IsLessOrEqual<U6, Output = True> + IsLessOrEqual<U5, Output = True> + IsLessOrEqual<U4, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI8<Fract> where
Fract: Unsigned + LeEqU8 + IsLessOrEqual<U7, Output = True> + IsLessOrEqual<U6, Output = True> + IsLessOrEqual<U5, Output = True> + IsLessOrEqual<U4, Output = True>,
[src]type RealField = Self
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn to_exp(self) -> (Self, Self)
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn abs(self) -> Self
[src]
fn signum(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, _n: i32) -> Self
[src]
fn powf(self, _n: Self) -> Self
[src]
fn powc(self, _n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, _base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, _other: Self) -> Self::RealField
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI16<Fract> where
Fract: Unsigned + LeEqU16 + IsLessOrEqual<U15, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True> + IsLessOrEqual<U12, Output = True>,
[src]type RealField = Self
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn to_exp(self) -> (Self, Self)
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn abs(self) -> Self
[src]
fn signum(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, _n: i32) -> Self
[src]
fn powf(self, _n: Self) -> Self
[src]
fn powc(self, _n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, _base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, _other: Self) -> Self::RealField
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI32<Fract> where
Fract: Unsigned + LeEqU32 + IsLessOrEqual<U31, Output = True> + IsLessOrEqual<U30, Output = True> + IsLessOrEqual<U29, Output = True> + IsLessOrEqual<U28, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI32<Fract> where
Fract: Unsigned + LeEqU32 + IsLessOrEqual<U31, Output = True> + IsLessOrEqual<U30, Output = True> + IsLessOrEqual<U29, Output = True> + IsLessOrEqual<U28, Output = True>,
[src]type RealField = Self
fn from_real(re: Self::RealField) -> Self
[src]
fn real(self) -> Self::RealField
[src]
fn imaginary(self) -> Self::RealField
[src]
fn norm1(self) -> Self::RealField
[src]
fn modulus(self) -> Self::RealField
[src]
fn modulus_squared(self) -> Self::RealField
[src]
fn argument(self) -> Self::RealField
[src]
fn to_exp(self) -> (Self, Self)
[src]
fn recip(self) -> Self
[src]
fn conjugate(self) -> Self
[src]
fn scale(self, factor: Self::RealField) -> Self
[src]
fn unscale(self, factor: Self::RealField) -> Self
[src]
fn floor(self) -> Self
[src]
fn ceil(self) -> Self
[src]
fn round(self) -> Self
[src]
fn trunc(self) -> Self
[src]
fn fract(self) -> Self
[src]
fn abs(self) -> Self
[src]
fn signum(self) -> Self
[src]
fn mul_add(self, a: Self, b: Self) -> Self
[src]
fn powi(self, _n: i32) -> Self
[src]
fn powf(self, _n: Self) -> Self
[src]
fn powc(self, _n: Self) -> Self
[src]
fn sqrt(self) -> Self
[src]
fn try_sqrt(self) -> Option<Self>
[src]
fn exp(self) -> Self
[src]
fn exp2(self) -> Self
[src]
fn exp_m1(self) -> Self
[src]
fn ln_1p(self) -> Self
[src]
fn ln(self) -> Self
[src]
fn log(self, _base: Self) -> Self
[src]
fn log2(self) -> Self
[src]
fn log10(self) -> Self
[src]
fn cbrt(self) -> Self
[src]
fn hypot(self, _other: Self) -> Self::RealField
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
fn is_finite(&self) -> bool
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI64<Fract> where
Fract: Unsigned + LeEqU64 + IsLessOrEqual<U63, Output = True> + IsLessOrEqual<U62, Output = True> + IsLessOrEqual<U61, Output = True> + IsLessOrEqual<U60, Output = True>,
[src]
impl<Fract: Send + Sync + 'static> ComplexField for FixedI64<Fract> where
Fract: Unsigned + LeEqU64 + IsLessOrEqual<U63, Output = True> + IsLessOrEqual<U62, Output = True> + IsLessOrEqual<U61, Output = True> + IsLessOrEqual<U60, Output = True>,
[src]