Skip to main content

SvdFloat

Trait SvdFloat 

Source
pub trait SvdFloat:
    FloatOpsTS
    + ScalarOperand
    + MulAcc
    + DivAssign
    + 'static {
    // Required methods
    fn eps() -> Self;
    fn eps34() -> Self;
    fn to_f64(self) -> f64;
    fn from_f64_val(v: f64) -> Self;

    // Provided method
    fn close(a: Self, b: Self) -> bool { ... }
}
Expand description

Scalar types this crate can decompose.

Implemented for f32 and f64. The supertraits are what the sparse kernels and the ndarray glue need; nothing here leaks a linear-algebra backend, because the small dense factorizations are always performed in f64 and cast back.

Required Methods§

Source

fn eps() -> Self

Machine epsilon.

Source

fn eps34() -> Self

eps^(3/4), the accuracy floor LAS2 clamps kappa to.

Source

fn to_f64(self) -> f64

Widen to f64 for the small dense factorizations.

Source

fn from_f64_val(v: f64) -> Self

Narrow back from f64.

Provided Methods§

Source

fn close(a: Self, b: Self) -> bool

Equality within one ulp-ish epsilon.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SvdFloat for f32

Source§

fn eps() -> Self

Source§

fn eps34() -> Self

Source§

fn to_f64(self) -> f64

Source§

fn from_f64_val(v: f64) -> Self

Source§

impl SvdFloat for f64

Source§

fn eps() -> Self

Source§

fn eps34() -> Self

Source§

fn to_f64(self) -> f64

Source§

fn from_f64_val(v: f64) -> Self

Implementors§