pub enum IntervalBoundary {
Infty,
Bound(Threshold),
}Expand description
Boundary of an interval
Variants§
Implementations§
Source§impl IntervalBoundary
impl IntervalBoundary
Sourcepub fn new_infty() -> IntervalBoundary
pub fn new_infty() -> IntervalBoundary
Create a new interval boundary representing the unbounded interval
border ∞
Sourcepub fn new_bound<T: Into<WeightedSum<Parameter>>, U: Into<Fraction>>(
param: T,
constant: U,
) -> IntervalBoundary
pub fn new_bound<T: Into<WeightedSum<Parameter>>, U: Into<Fraction>>( param: T, constant: U, ) -> IntervalBoundary
Create a new interval boundary representing a bound
param * x + constant
Sourcepub fn from_const<T: Into<Fraction>>(constant: T) -> IntervalBoundary
pub fn from_const<T: Into<Fraction>>(constant: T) -> IntervalBoundary
Create a new interval boundary representing a constant
Sourcepub fn try_is_constant(&self) -> Option<Fraction>
pub fn try_is_constant(&self) -> Option<Fraction>
If the interval boundary is a constant without parameters, this function returns the constant
Sourcepub fn get_threshold(&self) -> Option<&Threshold>
pub fn get_threshold(&self) -> Option<&Threshold>
Get the integer expression of the interval boundary
Returns None if the boundary is infinite, otherwise returns the
threshold
Sourcepub fn from_threshold_constraint(trc: &ThresholdConstraint) -> IntervalBoundary
pub fn from_threshold_constraint(trc: &ThresholdConstraint) -> IntervalBoundary
Extract the interval boundary from a threshold
Trait Implementations§
Source§impl Clone for IntervalBoundary
impl Clone for IntervalBoundary
Source§fn clone(&self) -> IntervalBoundary
fn clone(&self) -> IntervalBoundary
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 IntervalBoundary
impl Debug for IntervalBoundary
Source§impl Display for IntervalBoundary
impl Display for IntervalBoundary
Source§impl Hash for IntervalBoundary
impl Hash for IntervalBoundary
Source§impl Ord for IntervalBoundary
impl Ord for IntervalBoundary
Source§fn cmp(&self, other: &IntervalBoundary) -> Ordering
fn cmp(&self, other: &IntervalBoundary) -> 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 IntervalBoundary
impl PartialEq for IntervalBoundary
Source§impl PartialOrd for IntervalBoundary
impl PartialOrd for IntervalBoundary
impl Eq for IntervalBoundary
impl StructuralPartialEq for IntervalBoundary
Auto Trait Implementations§
impl Freeze for IntervalBoundary
impl RefUnwindSafe for IntervalBoundary
impl Send for IntervalBoundary
impl Sync for IntervalBoundary
impl Unpin for IntervalBoundary
impl UnwindSafe for IntervalBoundary
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