Trait CommonScalar
pub trait CommonScalar:
Clone
+ Copy
+ Zero<Output = Self>
+ One<Output = Self>
+ Add
+ Sub<Output = Self>
+ Mul
+ Div<Output = Self>
+ Neg<Output = Self>
+ Default
+ Send
+ Sync
+ BlasMul
+ 'static {
// Required methods
fn conj(self) -> Self;
fn abs_sq(self) -> f64;
fn abs(self) -> Self;
fn from_f64(val: f64) -> Self;
fn is_nan(self) -> bool;
// Provided methods
fn abs_val(self) -> f64 { ... }
fn epsilon() -> f64 { ... }
}Expand description
Common scalar trait for matrix and tensor operations.
This trait defines the minimal requirements for scalar types used in matrix cross interpolation and tensor train operations.
Required Methods§
fn conj(self) -> Self
fn conj(self) -> Self
Complex conjugate of the value.
fn abs(self) -> Self
fn abs(self) -> Self
Absolute value as Self type.
For real types, this returns the absolute value. For complex types, this returns a real-valued complex (re=|z|, im=0).
Provided Methods§
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.