Coef

Trait Coef 

Source
pub trait Coef: Clone {
    const MAX_MOD: Mod;

    // Required methods
    fn from_big(value: &BigInt, m: Mod) -> Self;
    fn from_i64(v: i64, m: Mod) -> Self;
    fn zero() -> Self;
    fn is_zero(&self) -> bool;
    fn assign_zero(&mut self);
    fn add_assign(&mut self, other: &Self, m: Mod);
    fn mul_assign(&mut self, other: &Self, m: Mod);
}
Expand description

A coefficient representation that can be used to perform variable substitution.

Required Associated Constants§

Required Methods§

Source

fn from_big(value: &BigInt, m: Mod) -> Self

Source

fn from_i64(v: i64, m: Mod) -> Self

Source

fn zero() -> Self

Source

fn is_zero(&self) -> bool

Source

fn assign_zero(&mut self)

Source

fn add_assign(&mut self, other: &Self, m: Mod)

Source

fn mul_assign(&mut self, other: &Self, m: Mod)

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 Coef for u64

Source§

const MAX_MOD: Mod

Source§

fn from_big(value: &BigInt, m: Mod) -> Self

Source§

fn from_i64(v: i64, m: Mod) -> Self

Source§

fn zero() -> Self

Source§

fn is_zero(&self) -> bool

Source§

fn assign_zero(&mut self)

Source§

fn add_assign(&mut self, other: &Self, m: Mod)

Source§

fn mul_assign(&mut self, other: &Self, m: Mod)

Source§

impl Coef for u128

Source§

const MAX_MOD: Mod

Source§

fn from_big(value: &BigInt, m: Mod) -> Self

Source§

fn from_i64(v: i64, m: Mod) -> Self

Source§

fn zero() -> Self

Source§

fn is_zero(&self) -> bool

Source§

fn assign_zero(&mut self)

Source§

fn add_assign(&mut self, other: &Self, m: Mod)

Source§

fn mul_assign(&mut self, other: &Self, m: Mod)

Implementors§

Source§

impl<const W: usize> Coef for ArrayCoef<W>