Skip to main content

DenseScalar

Trait DenseScalar 

Source
pub trait DenseScalar:
    Copy
    + PartialEq
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + Neg<Output = Self> {
    const ZERO: Self;
    const ONE: Self;

    // Required methods
    fn magnitude(self) -> f64;
    fn is_finite(self) -> bool;
    fn unscaled_magnitude(self) -> f64;
    fn reciprocal(self) -> Self;
    fn ratio_quotient(self, divisor: Self) -> Self;
}
Expand description

A scalar invert_dense_matrix works over: real (f64) or complex (Complex64).

Required Associated Constants§

Source

const ZERO: Self

The additive identity.

Source

const ONE: Self

The multiplicative identity.

Required Methods§

Source

fn magnitude(self) -> f64

The magnitude a pivot is compared by.

Source

fn is_finite(self) -> bool

Whether every component is finite.

Source

fn unscaled_magnitude(self) -> f64

The magnitude as √(re² + im²) without rescaling, so an extreme component’s square overflows or underflows as Free Pascal’s Cabs does (DensePivot::OpenDssDiagonal). The absolute value for a real.

Source

fn reciprocal(self) -> Self

The reciprocal, formed so that neither an extreme magnitude’s square nor its reciprocal overflows or underflows (Complex::finv).

Source

fn ratio_quotient(self, divisor: Self) -> Self

The quotient by Smith’s ratio division, the order Free Pascal’s ucomplex divides in (DensePivot::OpenDssDiagonal). Plain division for a real.

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 DenseScalar for Complex64

Source§

const ZERO: Self

Source§

const ONE: Self

Source§

fn magnitude(self) -> f64

Source§

fn is_finite(self) -> bool

Source§

fn unscaled_magnitude(self) -> f64

Source§

fn reciprocal(self) -> Self

Source§

fn ratio_quotient(self, divisor: Self) -> Self

Source§

impl DenseScalar for f64

Source§

const ZERO: Self = 0.0

Source§

const ONE: Self = 1.0

Source§

fn magnitude(self) -> f64

Source§

fn is_finite(self) -> bool

Source§

fn unscaled_magnitude(self) -> f64

Source§

fn reciprocal(self) -> Self

Source§

fn ratio_quotient(self, divisor: Self) -> Self

Implementors§