pub struct Term {
pub coeff: BigRational,
pub monomial: Monomial,
}Expand description
A term is a coefficient multiplied by a monomial.
Fields§
§coeff: BigRationalThe coefficient of the term.
monomial: MonomialThe monomial part of the term.
Implementations§
Source§impl Term
impl Term
Sourcepub fn new(coeff: BigRational, monomial: Monomial) -> Self
pub fn new(coeff: BigRational, monomial: Monomial) -> Self
Create a new term.
Sourcepub fn constant(c: BigRational) -> Self
pub fn constant(c: BigRational) -> Self
Create a constant term.
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Check if this is a constant term.
Trait Implementations§
impl Eq for Term
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl Freeze for Term
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnsafeUnpin for Term
impl UnwindSafe for Term
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