pub trait Scalar:
Copy
+ Default
+ FromPrimitive
+ Inv<Output = Self>
+ Neg<Output = Self>
+ NumAssign
+ NumCast
+ NumOps
+ Pow<Self, Output = Self>
+ Product
+ Sum
+ ToPrimitive
+ 'static {
type Complex: Scalar<Complex = Self::Complex, Real = Self::Real> + NumOps<Self::Real>;
type Real: Scalar<Complex = Self::Complex, Real = Self::Real> + NumOps<Self::Complex, Self::Complex>;
Show 33 methods
// Required methods
fn from_real(re: Self::Real) -> Self;
fn abs(self) -> Self::Real;
fn acos(self) -> Self;
fn acosh(self) -> Self;
fn asin(self) -> Self;
fn asinh(self) -> Self;
fn atan(self) -> Self;
fn atanh(self) -> Self;
fn as_complex(&self) -> Self::Complex;
fn conj(&self) -> Self::Complex;
fn re(&self) -> Self::Real;
fn cos(self) -> Self;
fn cosh(self) -> Self;
fn exp(self) -> Self;
fn ln(self) -> Self;
fn pow(self, exp: Self) -> Self;
fn powc(self, exp: Self::Complex) -> Self::Complex;
fn powf(self, exp: Self::Real) -> Self;
fn sin(self) -> Self;
fn sinh(self) -> Self;
fn sqrt(self) -> Self;
fn tan(self) -> Self;
fn tanh(self) -> Self;
// Provided methods
fn add_complex(&self, other: Self::Complex) -> Self::Complex { ... }
fn div_complex(&self, other: Self::Complex) -> Self::Complex { ... }
fn mul_complex(&self, other: Self::Complex) -> Self::Complex { ... }
fn sub_complex(&self, other: Self::Complex) -> Self::Complex { ... }
fn cubed(&self) -> Self { ... }
fn im(&self) -> Self::Real { ... }
fn inv(self) -> Self { ... }
fn powi(self, exp: i32) -> Self { ... }
fn recip(self) -> Self { ... }
fn sqr(self) -> Self { ... }
}
Required Associated Types§
type Complex: Scalar<Complex = Self::Complex, Real = Self::Real> + NumOps<Self::Real>
type Real: Scalar<Complex = Self::Complex, Real = Self::Real> + NumOps<Self::Complex, Self::Complex>
Required Methods§
fn from_real(re: Self::Real) -> Self
fn abs(self) -> Self::Real
fn acos(self) -> Self
fn acosh(self) -> Self
fn asin(self) -> Self
fn asinh(self) -> Self
fn atan(self) -> Self
fn atanh(self) -> Self
fn as_complex(&self) -> Self::Complex
fn conj(&self) -> Self::Complex
fn re(&self) -> Self::Real
fn cos(self) -> Self
fn cosh(self) -> Self
fn exp(self) -> Self
fn ln(self) -> Self
fn pow(self, exp: Self) -> Self
fn powc(self, exp: Self::Complex) -> Self::Complex
fn powf(self, exp: Self::Real) -> Self
fn sin(self) -> Self
fn sinh(self) -> Self
fn sqrt(self) -> Self
fn tan(self) -> Self
fn tanh(self) -> Self
Provided Methods§
fn add_complex(&self, other: Self::Complex) -> Self::Complex
fn div_complex(&self, other: Self::Complex) -> Self::Complex
fn mul_complex(&self, other: Self::Complex) -> Self::Complex
fn sub_complex(&self, other: Self::Complex) -> Self::Complex
fn cubed(&self) -> Self
fn im(&self) -> Self::Real
fn inv(self) -> Self
fn powi(self, exp: i32) -> Self
fn recip(self) -> Self
fn sqr(self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.