Trait linxal::types::impl_scalar::LinxalImplScalar
[−]
[src]
pub trait LinxalImplScalar: Sized + Default + Clone + Debug + Display + Zero + One + Sub<Output = Self> + LinalgScalar { type RealPart: LinxalImplScalar + Float + NumCast + From<f32> + SampleRange; type Complex: LinxalImplScalar; fn cj(self) -> Self; fn mag(self) -> Self::RealPart; fn eps() -> Self::RealPart; fn tol() -> Self::RealPart; fn from_real(f: Self::RealPart) -> Self; }
Aggregate trait for implementing matrix operations and utilities.
This trait is unifies most required operations for real and complex scalars. It also defines common utility functions for internal implementations.
Associated Types
type RealPart: LinxalImplScalar + Float + NumCast + From<f32> + SampleRange
Associated type defining the type of just the real portion of the scalar.
For real-type scalars, this type is trivially the type itself.
type Complex: LinxalImplScalar
Associated type defining the complex variant of this scalar.
For real-type scalars, this type is trivially the type itself.
Required Methods
fn cj(self) -> Self
Return the conjugate of the value.
fn mag(self) -> Self::RealPart
Returns the magnitude of the scalar.
fn eps() -> Self::RealPart
Return the machine epsilon for the value.
fn tol() -> Self::RealPart
Return the default tolerance used for comparisons.
fn from_real(f: Self::RealPart) -> Self
Return an equivalent value from just a real part.