pub trait Ring:
AddGrp
+ Mon
+ RingOpswhere
for<'a> &'a Self: RingOps<Self>,{
// Required methods
fn inv(&self) -> Option<Self>;
fn is_unit(&self) -> bool;
fn normalizing_unit(&self) -> Self;
// Provided methods
fn from_sign(s: Sign) -> Self { ... }
fn normalized(&self) -> Self { ... }
fn into_normalized(self) -> Self { ... }
fn is_pm_one(&self) -> bool { ... }
fn c_weight(&self) -> f64 { ... }
}Expand description
Required Methods§
Sourcefn inv(&self) -> Option<Self>
fn inv(&self) -> Option<Self>
Multiplicative inverse, if this element is a unit; otherwise None.
Sourcefn normalizing_unit(&self) -> Self
fn normalizing_unit(&self) -> Self
A unit u such that self * u is the chosen canonical associate of self.
For example, in ℤ the normalizing unit of -n is -1 (giving n);
in a field every nonzero element is its own normalizer (returning self.inv()).
Provided Methods§
Sourcefn normalized(&self) -> Self
fn normalized(&self) -> Self
The canonical associate of self (i.e. self * self.normalizing_unit()).
Sourcefn into_normalized(self) -> Self
fn into_normalized(self) -> Self
Like normalized, but consuming.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".