pub enum Coeff {
Rat(Rat),
Big(BigRat),
}Variants§
Implementations§
Source§impl Coeff
impl Coeff
pub const ZERO: Coeff
pub const ONE: Coeff
pub fn is_zero(&self) -> bool
pub fn is_positive(&self) -> bool
pub fn is_negative(&self) -> bool
Sourcepub fn canonicalize(self) -> Self
pub fn canonicalize(self) -> Self
Canonicalize: demote Big to Rat if it fits.
pub fn from_rat(r: Rat) -> Self
pub fn from_bigrat(b: BigRat) -> Self
pub fn from_i64(n: i64) -> Self
Trait Implementations§
Source§impl AddAssign for Coeff
impl AddAssign for Coeff
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl MulAssign for Coeff
impl MulAssign for Coeff
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for Coeff
impl Ord for Coeff
Source§impl PartialOrd for Coeff
impl PartialOrd for Coeff
Source§impl SubAssign for Coeff
impl SubAssign for Coeff
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Eq for Coeff
Auto Trait Implementations§
impl Freeze for Coeff
impl RefUnwindSafe for Coeff
impl Send for Coeff
impl Sync for Coeff
impl Unpin for Coeff
impl UnsafeUnpin for Coeff
impl UnwindSafe for Coeff
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