pub enum IntegerExpr<V>where
V: Clone,{
Show 14 variants
Const(Integer),
Var(V),
Nat(NaturalExpr<V>),
Rand(Box<(IntegerExpr<V>, IntegerExpr<V>)>),
Opposite(Box<IntegerExpr<V>>),
Sum(Vec<IntegerExpr<V>>),
Product(Vec<IntegerExpr<V>>),
Div(Box<(IntegerExpr<V>, IntegerExpr<V>)>),
Rem(Box<(IntegerExpr<V>, IntegerExpr<V>)>),
Floor(Box<FloatExpr<V>>),
Ceil(Box<FloatExpr<V>>),
Min(Box<(IntegerExpr<V>, IntegerExpr<V>)>),
Max(Box<(IntegerExpr<V>, IntegerExpr<V>)>),
Ite(Box<(BooleanExpr<V>, IntegerExpr<V>, IntegerExpr<V>)>),
}Expand description
Integer expressions.
Variants§
Const(Integer)
A constant value.
Var(V)
A typed variable.
Nat(NaturalExpr<V>)
Conversion from Natural
Rand(Box<(IntegerExpr<V>, IntegerExpr<V>)>)
A random integer between a lower bound (included) and an upper bound (excluded).
Opposite(Box<IntegerExpr<V>>)
Opposite of a numerical expression.
Sum(Vec<IntegerExpr<V>>)
Arithmetic n-ary sum.
Product(Vec<IntegerExpr<V>>)
Arithmetic n-ary multiplication.
Div(Box<(IntegerExpr<V>, IntegerExpr<V>)>)
Div operation
Rem(Box<(IntegerExpr<V>, IntegerExpr<V>)>)
Rem operation
Floor(Box<FloatExpr<V>>)
Floor
Ceil(Box<FloatExpr<V>>)
Ceil
Min(Box<(IntegerExpr<V>, IntegerExpr<V>)>)
Min of two values
Max(Box<(IntegerExpr<V>, IntegerExpr<V>)>)
Max of two values
Ite(Box<(BooleanExpr<V>, IntegerExpr<V>, IntegerExpr<V>)>)
If-Then-Else construct, where If must be a boolean expression, Then and Else must have the same type, and this is also the type of the whole expression.
Implementations§
Trait Implementations§
Source§impl<V> Add for IntegerExpr<V>where
V: Clone,
impl<V> Add for IntegerExpr<V>where
V: Clone,
Source§impl<V> Clone for IntegerExpr<V>
impl<V> Clone for IntegerExpr<V>
Source§fn clone(&self) -> IntegerExpr<V>
fn clone(&self) -> IntegerExpr<V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V> Debug for IntegerExpr<V>
impl<V> Debug for IntegerExpr<V>
Source§impl<V> Div for IntegerExpr<V>where
V: Clone,
impl<V> Div for IntegerExpr<V>where
V: Clone,
Source§impl<V> From<IntegerExpr<V>> for FloatExpr<V>where
V: Clone,
impl<V> From<IntegerExpr<V>> for FloatExpr<V>where
V: Clone,
Source§fn from(value: IntegerExpr<V>) -> Self
fn from(value: IntegerExpr<V>) -> Self
Converts to this type from the input type.
Source§impl<V> From<NaturalExpr<V>> for IntegerExpr<V>where
V: Clone,
impl<V> From<NaturalExpr<V>> for IntegerExpr<V>where
V: Clone,
Source§fn from(value: NaturalExpr<V>) -> Self
fn from(value: NaturalExpr<V>) -> Self
Converts to this type from the input type.
Source§impl<V> GetSize for IntegerExpr<V>
impl<V> GetSize for IntegerExpr<V>
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl<V> Mul for IntegerExpr<V>where
V: Clone,
impl<V> Mul for IntegerExpr<V>where
V: Clone,
Source§impl<V> Neg for IntegerExpr<V>where
V: Clone,
impl<V> Neg for IntegerExpr<V>where
V: Clone,
Auto Trait Implementations§
impl<V> Freeze for IntegerExpr<V>where
V: Freeze,
impl<V> RefUnwindSafe for IntegerExpr<V>where
V: RefUnwindSafe,
impl<V> Send for IntegerExpr<V>where
V: Send,
impl<V> Sync for IntegerExpr<V>where
V: Sync,
impl<V> Unpin for IntegerExpr<V>where
V: Unpin,
impl<V> UnsafeUnpin for IntegerExpr<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for IntegerExpr<V>where
V: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more