Trait cauchy::Scalar[][src]

pub trait Scalar: NumAssign + FromPrimitive + NumCast + Neg<Output = Self> + Copy + Clone + Display + Debug + LowerExp + UpperExp + Sum + Product + Serialize + for<'de> Deserialize<'de> + 'static {
    type Real: Scalar<Real = Self::Real, Complex = Self::Complex> + NumOps<Self::Real, Self::Real> + Float;
    type Complex: Scalar<Real = Self::Real, Complex = Self::Complex> + NumOps<Self::Real, Self::Complex> + NumOps<Self::Complex, Self::Complex>;
    fn real<T: ToPrimitive>(re: T) -> Self::Real;
fn complex<T: ToPrimitive>(re: T, im: T) -> Self::Complex;
fn from_real(re: Self::Real) -> Self;
fn add_real(self, re: Self::Real) -> Self;
fn sub_real(self, re: Self::Real) -> Self;
fn mul_real(self, re: Self::Real) -> Self;
fn div_real(self, re: Self::Real) -> Self;
fn add_complex(self, im: Self::Complex) -> Self::Complex;
fn sub_complex(self, im: Self::Complex) -> Self::Complex;
fn mul_complex(self, im: Self::Complex) -> Self::Complex;
fn div_complex(self, im: Self::Complex) -> Self::Complex;
fn pow(self, n: Self) -> Self;
fn powi(self, n: i32) -> Self;
fn powf(self, n: Self::Real) -> Self;
fn powc(self, n: Self::Complex) -> Self::Complex;
fn re(&self) -> Self::Real;
fn im(&self) -> Self::Real;
fn as_c(&self) -> Self::Complex;
fn conj(&self) -> Self;
fn abs(self) -> Self::Real;
fn square(self) -> Self::Real;
fn sqrt(self) -> Self;
fn exp(self) -> Self;
fn ln(self) -> Self;
fn sin(self) -> Self;
fn cos(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 rand(rng: &mut impl Rng) -> Self; }

Associated Types

type Real: Scalar<Real = Self::Real, Complex = Self::Complex> + NumOps<Self::Real, Self::Real> + Float[src]

type Complex: Scalar<Real = Self::Real, Complex = Self::Complex> + NumOps<Self::Real, Self::Complex> + NumOps<Self::Complex, Self::Complex>[src]

Loading content...

Required methods

fn real<T: ToPrimitive>(re: T) -> Self::Real[src]

Create a new real number

fn complex<T: ToPrimitive>(re: T, im: T) -> Self::Complex[src]

Create a new complex number

fn from_real(re: Self::Real) -> Self[src]

fn add_real(self, re: Self::Real) -> Self[src]

fn sub_real(self, re: Self::Real) -> Self[src]

fn mul_real(self, re: Self::Real) -> Self[src]

fn div_real(self, re: Self::Real) -> Self[src]

fn add_complex(self, im: Self::Complex) -> Self::Complex[src]

fn sub_complex(self, im: Self::Complex) -> Self::Complex[src]

fn mul_complex(self, im: Self::Complex) -> Self::Complex[src]

fn div_complex(self, im: Self::Complex) -> Self::Complex[src]

fn pow(self, n: Self) -> Self[src]

fn powi(self, n: i32) -> Self[src]

fn powf(self, n: Self::Real) -> Self[src]

fn powc(self, n: Self::Complex) -> Self::Complex[src]

fn re(&self) -> Self::Real[src]

Real part

fn im(&self) -> Self::Real[src]

Imaginary part

fn as_c(&self) -> Self::Complex[src]

As a complex number

fn conj(&self) -> Self[src]

Complex conjugate

fn abs(self) -> Self::Real[src]

Absolute value

fn square(self) -> Self::Real[src]

Sqaure of absolute value

fn sqrt(self) -> Self[src]

fn exp(self) -> Self[src]

fn ln(self) -> Self[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 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 rand(rng: &mut impl Rng) -> Self[src]

Generate an random number from rand::distributions::Standard

Loading content...

Implementations on Foreign Types

impl Scalar for f32[src]

type Real = f32

type Complex = c32

impl Scalar for f64[src]

type Real = f64

type Complex = c64

Loading content...

Implementors

impl Scalar for c32[src]

type Real = f32

type Complex = c32

impl Scalar for c64[src]

type Real = f64

type Complex = c64

Loading content...