pub enum NoDivIntegerExpr<T: Atomic> {
Atom(T),
Frac(Fraction),
Param(Parameter),
BinaryExpr(Box<NoDivIntegerExpr<T>>, NoDivIntegerOp, Box<NoDivIntegerExpr<T>>),
}Expand description
Integer expression without division operators
Variants§
Atom(T)
Atom of type T
Frac(Fraction)
Constant fraction
Param(Parameter)
Parameter
BinaryExpr(Box<NoDivIntegerExpr<T>>, NoDivIntegerOp, Box<NoDivIntegerExpr<T>>)
Integer expression combining two integer expressions through an arithmetic operator
Implementations§
Source§impl<T: Atomic> NoDivIntegerExpr<T>
impl<T: Atomic> NoDivIntegerExpr<T>
Sourcepub fn split_into_factor_pairs(
self,
) -> Result<LinearIntegerExpr<T>, ConstraintRewriteError>
pub fn split_into_factor_pairs( self, ) -> Result<LinearIntegerExpr<T>, ConstraintRewriteError>
Split the expression into pairs of factors and an atom / parameter or constant
fn collect_pairs(self) -> Result<Vec<AtomFactorPair<T>>, ConstraintRewriteError>
Sourcepub fn try_to_fraction(self) -> Option<Fraction>
pub fn try_to_fraction(self) -> Option<Fraction>
Try to convert the expression to a fraction
Trait Implementations§
Source§impl<T: Clone + Atomic> Clone for NoDivIntegerExpr<T>
impl<T: Clone + Atomic> Clone for NoDivIntegerExpr<T>
Source§fn clone(&self) -> NoDivIntegerExpr<T>
fn clone(&self) -> NoDivIntegerExpr<T>
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<T> Display for NoDivIntegerExpr<T>where
T: Atomic,
impl<T> Display for NoDivIntegerExpr<T>where
T: Atomic,
Source§impl<T: Atomic> TryFrom<NoDivIntegerExpr<T>> for LinearIntegerExpr<T>
impl<T: Atomic> TryFrom<NoDivIntegerExpr<T>> for LinearIntegerExpr<T>
Source§type Error = ConstraintRewriteError
type Error = ConstraintRewriteError
The type returned in the event of a conversion error.
Source§impl<T: Atomic> TryFrom<NonMinusIntegerExpr<T>> for NoDivIntegerExpr<T>
impl<T: Atomic> TryFrom<NonMinusIntegerExpr<T>> for NoDivIntegerExpr<T>
Source§type Error = ConstraintRewriteError
type Error = ConstraintRewriteError
The type returned in the event of a conversion error.
impl<T: Atomic> StructuralPartialEq for NoDivIntegerExpr<T>
Auto Trait Implementations§
impl<T> Freeze for NoDivIntegerExpr<T>where
T: Freeze,
impl<T> RefUnwindSafe for NoDivIntegerExpr<T>where
T: RefUnwindSafe,
impl<T> Send for NoDivIntegerExpr<T>where
T: Send,
impl<T> Sync for NoDivIntegerExpr<T>where
T: Sync,
impl<T> Unpin for NoDivIntegerExpr<T>where
T: Unpin,
impl<T> UnwindSafe for NoDivIntegerExpr<T>where
T: UnwindSafe,
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