pub struct Polynomial {
pub map: BTreeMap<Monomial, Rational>,
}Expand description
Uniquely reduced form of a symbolic polynomial expression.
A Laurent polynomial $P_b$ is realized as the sum of products of a Rational coefficient
$C_m$ and a primitive Laurent Monomial $M_m$ (i.e., an element of an ordered polynomial
basis).
P_b \equiv \sum_m C_m M_mAll operators (e.g., Add, Mul) implemented for Polynomial reduce an arbitrary
expression into this unique form.
Fields§
§map: BTreeMap<Monomial, Rational>Symbolic storage.
Implementations§
Source§impl Polynomial
impl Polynomial
Sourcepub fn signed_gcd(&self) -> Rational
pub fn signed_gcd(&self) -> Rational
GCD and predominant sign of coefficients.
Sourcepub fn signed_lcd(&self) -> Rational
pub fn signed_lcd(&self) -> Rational
LCD and predominant sign of coefficients.
Trait Implementations§
Source§impl Add for Polynomial
impl Add for Polynomial
Source§impl AddAssign for Polynomial
impl AddAssign for Polynomial
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl Clone for Polynomial
impl Clone for Polynomial
Source§fn clone(&self) -> Polynomial
fn clone(&self) -> Polynomial
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Polynomial
impl Debug for Polynomial
Source§impl Default for Polynomial
impl Default for Polynomial
Source§fn default() -> Polynomial
fn default() -> Polynomial
Returns the “default value” for a type. Read more
Source§impl Div<Rational> for Polynomial
impl Div<Rational> for Polynomial
Source§impl Div<i32> for Polynomial
impl Div<i32> for Polynomial
Source§impl DivAssign<Rational> for Polynomial
impl DivAssign<Rational> for Polynomial
Source§fn div_assign(&mut self, other: Rational)
fn div_assign(&mut self, other: Rational)
Performs the
/= operation. Read moreSource§impl DivAssign<i32> for Polynomial
impl DivAssign<i32> for Polynomial
Source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Performs the
/= operation. Read moreSource§impl From<Factorization> for Polynomial
impl From<Factorization> for Polynomial
Source§fn from(f: Factorization) -> Self
fn from(f: Factorization) -> Self
Converts to this type from the input type.
Source§impl From<Polynomial> for Factorization
impl From<Polynomial> for Factorization
Source§fn from(p: Polynomial) -> Self
fn from(p: Polynomial) -> Self
Converts to this type from the input type.
Source§impl From<Polynomial> for Tree
impl From<Polynomial> for Tree
Source§fn from(p: Polynomial) -> Self
fn from(p: Polynomial) -> Self
Converts to this type from the input type.
Source§impl<M, S> FromIterator<M> for Polynomial
impl<M, S> FromIterator<M> for Polynomial
Source§fn from_iter<P: IntoIterator<Item = M>>(iter: P) -> Self
fn from_iter<P: IntoIterator<Item = M>>(iter: P) -> Self
Creates a value from an iterator. Read more
Source§impl Mul<Rational> for Polynomial
impl Mul<Rational> for Polynomial
Source§impl Mul<i32> for Polynomial
impl Mul<i32> for Polynomial
Source§impl Mul for Polynomial
impl Mul for Polynomial
Source§impl MulAssign<Rational> for Polynomial
impl MulAssign<Rational> for Polynomial
Source§fn mul_assign(&mut self, other: Rational)
fn mul_assign(&mut self, other: Rational)
Performs the
*= operation. Read moreSource§impl MulAssign<i32> for Polynomial
impl MulAssign<i32> for Polynomial
Source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the
*= operation. Read moreSource§impl MulAssign for Polynomial
impl MulAssign for Polynomial
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl Neg for Polynomial
impl Neg for Polynomial
Source§impl Ord for Polynomial
impl Ord for Polynomial
Source§fn cmp(&self, other: &Polynomial) -> Ordering
fn cmp(&self, other: &Polynomial) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Polynomial
impl PartialEq for Polynomial
Source§impl PartialOrd for Polynomial
impl PartialOrd for Polynomial
Source§impl Sub for Polynomial
impl Sub for Polynomial
Source§impl SubAssign for Polynomial
impl SubAssign for Polynomial
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Eq for Polynomial
impl StructuralPartialEq for Polynomial
Auto Trait Implementations§
impl Freeze for Polynomial
impl RefUnwindSafe for Polynomial
impl Send for Polynomial
impl Sync for Polynomial
impl Unpin for Polynomial
impl UnwindSafe for Polynomial
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