pub struct StaticIntervalOrder {
single_var_order: HashMap<Variable, Vec<Interval>>,
multi_var_order: HashMap<WeightedSum<Variable>, Vec<Interval>>,
equal_boundaries: HashMap<IntervalBoundary, IntervalBoundary>,
}Expand description
Static order on intervals implementing IntervalOrder for variables and
sums of variables
Fields§
§single_var_order: HashMap<Variable, Vec<Interval>>Order on intervals for each variable
multi_var_order: HashMap<WeightedSum<Variable>, Vec<Interval>>Order on intervals multi-variable guards
equal_boundaries: HashMap<IntervalBoundary, IntervalBoundary>Interval boundaries that are considered equal
Implementations§
Source§impl StaticIntervalOrder
impl StaticIntervalOrder
Sourcepub fn single_var_order(&self) -> &HashMap<Variable, Vec<Interval>>
pub fn single_var_order(&self) -> &HashMap<Variable, Vec<Interval>>
returns the underlying single_var_order
Trait Implementations§
Source§impl Clone for StaticIntervalOrder
impl Clone for StaticIntervalOrder
Source§fn clone(&self) -> StaticIntervalOrder
fn clone(&self) -> StaticIntervalOrder
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 StaticIntervalOrder
impl Debug for StaticIntervalOrder
Source§impl DefinesStaticIntervalOrder<Variable> for StaticIntervalOrder
impl DefinesStaticIntervalOrder<Variable> for StaticIntervalOrder
Source§fn check_interval_replaced_by_eq(
&self,
ib: IntervalBoundary,
) -> IntervalBoundary
fn check_interval_replaced_by_eq( &self, ib: IntervalBoundary, ) -> IntervalBoundary
This function checks whether the interval needs to be replaced by another one because it is considered equal to another boundary in the order.
This function must be called when converting thresholds in the order.
fn get_intervals<'a>( &'a self, var: &Variable, ) -> Result<&'a Vec<Interval>, IntervalOrderError<Variable>>
fn get_interval_index( &self, var: &Variable, i: &Interval, ) -> Result<usize, IntervalOrderError<Variable>>
fn get_interval_by_index<'a>( &'a self, var: &Variable, idx: usize, ) -> Result<&'a Interval, IntervalOrderError<Variable>>
Source§impl DefinesStaticIntervalOrder<WeightedSum<Variable>> for StaticIntervalOrder
impl DefinesStaticIntervalOrder<WeightedSum<Variable>> for StaticIntervalOrder
fn get_intervals<'a>( &'a self, var: &WeightedSum<Variable>, ) -> Result<&'a Vec<Interval>, IntervalOrderError<WeightedSum<Variable>>>
fn get_interval_index( &self, var: &WeightedSum<Variable>, i: &Interval, ) -> Result<usize, IntervalOrderError<WeightedSum<Variable>>>
fn get_interval_by_index<'a>( &'a self, var: &WeightedSum<Variable>, idx: usize, ) -> Result<&'a Interval, IntervalOrderError<WeightedSum<Variable>>>
Source§fn check_interval_replaced_by_eq(
&self,
ib: IntervalBoundary,
) -> IntervalBoundary
fn check_interval_replaced_by_eq( &self, ib: IntervalBoundary, ) -> IntervalBoundary
Check whether the interval order replaces the interval boundary Read more
Source§impl Display for StaticIntervalOrder
impl Display for StaticIntervalOrder
Source§impl IntervalOrder for StaticIntervalOrder
impl IntervalOrder for StaticIntervalOrder
Source§fn order_to_boolean_expr<T: Atomic>(&self) -> Vec<BooleanExpression<T>>
fn order_to_boolean_expr<T: Atomic>(&self) -> Vec<BooleanExpression<T>>
Convert the order to a boolean expression Read more
Source§impl PartialEq for StaticIntervalOrder
impl PartialEq for StaticIntervalOrder
impl StructuralPartialEq for StaticIntervalOrder
Auto Trait Implementations§
impl Freeze for StaticIntervalOrder
impl RefUnwindSafe for StaticIntervalOrder
impl Send for StaticIntervalOrder
impl Sync for StaticIntervalOrder
impl Unpin for StaticIntervalOrder
impl UnwindSafe for StaticIntervalOrder
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, U> IntervalOrderFor<T> for Uwhere
T: HasAssociatedIntervals,
U: DefinesStaticIntervalOrder<T>,
impl<T, U> IntervalOrderFor<T> for Uwhere
T: HasAssociatedIntervals,
U: DefinesStaticIntervalOrder<T>,
Source§fn get_number_of_intervals(
&self,
var: &T,
) -> Result<usize, IntervalOrderError<T>>
fn get_number_of_intervals( &self, var: &T, ) -> Result<usize, IntervalOrderError<T>>
Get the number of intervals associated with
tSource§fn lt(
&self,
var: &T,
i1: &Interval,
i2: &Interval,
) -> Result<bool, IntervalOrderError<T>>
fn lt( &self, var: &T, i1: &Interval, i2: &Interval, ) -> Result<bool, IntervalOrderError<T>>
Source§fn gt(
&self,
var: &T,
i1: &Interval,
i2: &Interval,
) -> Result<bool, IntervalOrderError<T>>
fn gt( &self, var: &T, i1: &Interval, i2: &Interval, ) -> Result<bool, IntervalOrderError<T>>
Source§fn get_next_interval<'a>(
&'a self,
var: &T,
i: &Interval,
) -> Result<Option<&'a Interval>, IntervalOrderError<T>>
fn get_next_interval<'a>( &'a self, var: &T, i: &Interval, ) -> Result<Option<&'a Interval>, IntervalOrderError<T>>
Source§fn get_previous_interval<'a>(
&'a self,
var: &T,
i: &Interval,
) -> Result<Option<&'a Interval>, IntervalOrderError<T>>
fn get_previous_interval<'a>( &'a self, var: &T, i: &Interval, ) -> Result<Option<&'a Interval>, IntervalOrderError<T>>
Source§fn compute_enabled_intervals_of_threshold(
&self,
t: &T,
thr: &ThresholdConstraint,
) -> Result<Vec<Interval>, IntervalOrderError<T>>
fn compute_enabled_intervals_of_threshold( &self, t: &T, thr: &ThresholdConstraint, ) -> Result<Vec<Interval>, IntervalOrderError<T>>
Get the intervals of
t where thr is enabledSource§fn get_zero_interval(&self, t: &T) -> Result<&Interval, IntervalOrderError<T>>
fn get_zero_interval(&self, t: &T) -> Result<&Interval, IntervalOrderError<T>>
Get the zero interval of
tSource§fn get_all_intervals_of_t(
&self,
t: &T,
) -> Result<&Vec<Interval>, IntervalOrderError<T>>
fn get_all_intervals_of_t( &self, t: &T, ) -> Result<&Vec<Interval>, IntervalOrderError<T>>
Get all intervals associated with
t Read moreSource§fn check_interval_replaced(&self, ib: IntervalBoundary) -> IntervalBoundary
fn check_interval_replaced(&self, ib: IntervalBoundary) -> IntervalBoundary
Check whether the interval order replaces the interval boundary Read more
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