Trait ndarray_linalg::types::Scalar[][src]

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

Associated Types

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

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

Loading content...

Required methods

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

Create a new real number

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

Create a new complex number

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Real part

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

Imaginary part

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

As a complex number

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

Complex conjugate

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

Absolute value

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

Sqaure of absolute value

pub fn sqrt(self) -> Self[src]

pub fn exp(self) -> Self[src]

pub fn ln(self) -> Self[src]

pub fn sin(self) -> Self[src]

pub fn cos(self) -> Self[src]

pub fn tan(self) -> Self[src]

pub fn asin(self) -> Self[src]

pub fn acos(self) -> Self[src]

pub fn atan(self) -> Self[src]

pub fn sinh(self) -> Self[src]

pub fn cosh(self) -> Self[src]

pub fn tanh(self) -> Self[src]

pub fn asinh(self) -> Self[src]

pub fn acosh(self) -> Self[src]

pub fn atanh(self) -> Self[src]

pub 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 = Complex<f32>

impl Scalar for f64[src]

type Real = f64

type Complex = Complex<f64>

impl Scalar for Complex<f64>[src]

type Real = f64

type Complex = Complex<f64>

impl Scalar for Complex<f32>[src]

type Real = f32

type Complex = Complex<f32>

Loading content...

Implementors

Loading content...