pub struct MPoly { /* private fields */ }Expand description
A polynomial over the run’s slots with real algebraic coefficients: each monomial by its exponents, listed once, in order, none with a zero coefficient.
Implementations§
Source§impl MPoly
impl MPoly
pub fn zero(width: usize) -> MPoly
pub fn constant(width: usize, a: Algebraic) -> MPoly
pub fn from_terms(width: usize, terms: Vec<(Vec<u32>, Algebraic)>) -> MPoly
pub fn width(&self) -> usize
pub fn terms(&self) -> &[(Vec<u32>, Algebraic)]
pub fn is_zero(&self) -> bool
pub fn add(&self, o: &MPoly) -> MPoly
pub fn neg(&self) -> MPoly
pub fn sub(&self, o: &MPoly) -> MPoly
pub fn scale(&self, k: &Algebraic) -> MPoly
pub fn mul(&self, o: &MPoly) -> MPoly
pub fn reads_slot(&self, i: usize) -> bool
pub fn eval<R: Ring>(&self, x: &[R]) -> Result<R, String>
Sourcepub fn proportional_to(&self, o: &MPoly) -> Option<Algebraic>
pub fn proportional_to(&self, o: &MPoly) -> Option<Algebraic>
The k ≠ 0 with self = k·o.
Trait Implementations§
impl Eq for MPoly
impl StructuralPartialEq for MPoly
Auto Trait Implementations§
impl Freeze for MPoly
impl RefUnwindSafe for MPoly
impl Send for MPoly
impl Sync for MPoly
impl Unpin for MPoly
impl UnsafeUnpin for MPoly
impl UnwindSafe for MPoly
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more