Field

Trait Field 

Source
pub trait Field: EuclideanDomain {
    // Required method
    fn inv(&self) -> Option<Self>;
}
Expand description

Field: Euclidean domain where every non-zero element has multiplicative inverse

Examples: rational numbers Q, real numbers R, finite fields Z_p (p prime)

Key property: For any a ≠ 0, exists a⁻¹ such that a * a⁻¹ = 1

Required Methods§

Source

fn inv(&self) -> Option<Self>

Multiplicative inverse

Returns None if element is zero

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.

Implementations on Foreign Types§

Source§

impl Field for Ratio<i64>

Source§

fn inv(&self) -> Option<Self>

Implementors§