pub enum FloatExpr<V>where
V: Clone,{
Const(Float),
Var(V),
Nat(NaturalExpr<V>),
Int(IntegerExpr<V>),
Rand(Box<(FloatExpr<V>, FloatExpr<V>)>),
Opposite(Box<FloatExpr<V>>),
Sum(Vec<FloatExpr<V>>),
Product(Vec<FloatExpr<V>>),
Div(Box<(FloatExpr<V>, FloatExpr<V>)>),
Min(Box<(FloatExpr<V>, FloatExpr<V>)>),
Max(Box<(FloatExpr<V>, FloatExpr<V>)>),
Ite(Box<(BooleanExpr<V>, FloatExpr<V>, FloatExpr<V>)>),
}Expand description
Floating-point numerical expression.
Variants§
Const(Float)
A constant value.
Var(V)
A typed variable.
Nat(NaturalExpr<V>)
Conversion from Natural
Int(IntegerExpr<V>)
Conversion from Integer
Rand(Box<(FloatExpr<V>, FloatExpr<V>)>)
A random integer between a lower bound (included) and an upper bound (excluded).
Opposite(Box<FloatExpr<V>>)
Opposite of a numerical expression.
Sum(Vec<FloatExpr<V>>)
Arithmetic n-ary sum.
Product(Vec<FloatExpr<V>>)
Arithmetic n-ary multiplication.
Div(Box<(FloatExpr<V>, FloatExpr<V>)>)
Div operation
Min(Box<(FloatExpr<V>, FloatExpr<V>)>)
Min of two values
Max(Box<(FloatExpr<V>, FloatExpr<V>)>)
Max of two values
Ite(Box<(BooleanExpr<V>, FloatExpr<V>, FloatExpr<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> 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 FloatExpr<V>where
V: Clone,
impl<V> From<NaturalExpr<V>> for FloatExpr<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 FloatExpr<V>
impl<V> GetSize for FloatExpr<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 moreAuto Trait Implementations§
impl<V> Freeze for FloatExpr<V>where
V: Freeze,
impl<V> RefUnwindSafe for FloatExpr<V>where
V: RefUnwindSafe,
impl<V> Send for FloatExpr<V>where
V: Send,
impl<V> Sync for FloatExpr<V>where
V: Sync,
impl<V> Unpin for FloatExpr<V>where
V: Unpin,
impl<V> UnsafeUnpin for FloatExpr<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for FloatExpr<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