Trait RingNormalize

Source
pub trait RingNormalize {
    // Required methods
    fn leading_unit(&self) -> Self;
    fn normalize_mut(&mut self);

    // Provided methods
    fn into_normalize(self) -> Self
       where Self: Sized { ... }
    fn normalize(&self) -> Self
       where Self: Clone { ... }
    fn is_similar(&self, other: &Self) -> bool
       where Self: Clone + Eq { ... }
}
Expand description

Normarize ring element

abs(a) in $\mathbb{Z}$. a/lc(a) in $R[x]$ (lc(x) is leading coefficent of x).

Required Methods§

Source

fn leading_unit(&self) -> Self

Source

fn normalize_mut(&mut self)

Provided Methods§

Source

fn into_normalize(self) -> Self
where Self: Sized,

Source

fn normalize(&self) -> Self
where Self: Clone,

Source

fn is_similar(&self, other: &Self) -> bool
where Self: Clone + Eq,

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 RingNormalize for i8

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for i16

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for i32

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for i64

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for i128

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for isize

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for u8

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for u16

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for u32

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for u64

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for u128

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Source§

impl RingNormalize for usize

Source§

fn leading_unit(&self) -> Self

Source§

fn normalize_mut(&mut self)

Implementors§