pub struct Union { /* private fields */ }Expand description
Calculates the union between multiple variable domains.
Can be used incrementally through Union::add. Using Union::reset the union is reset to
an empty state.
Implementations§
Source§impl Union
impl Union
Sourcepub fn lower_bound(&self) -> IntExt
pub fn lower_bound(&self) -> IntExt
Get the lower bound of the union of all added domains.
If the union is empty, this is IntExt::PositiveInf.
Sourcepub fn upper_bound(&self) -> IntExt
pub fn upper_bound(&self) -> IntExt
Get the upper bound of the union of all added domains.
If the union is empty, this is IntExt::NegativeInf.
Sourcepub fn holes(&self) -> impl Iterator<Item = i32> + '_
pub fn holes(&self) -> impl Iterator<Item = i32> + '_
Get the holes in the union of all added domains.
Sourcepub fn add<Atomic: AtomicConstraint>(
&mut self,
state: &VariableState<Atomic>,
variable: &impl CheckerVariable<Atomic>,
)
pub fn add<Atomic: AtomicConstraint>( &mut self, state: &VariableState<Atomic>, variable: &impl CheckerVariable<Atomic>, )
Add a variable to the union.
Sourcepub fn is_consistent(&self) -> bool
pub fn is_consistent(&self) -> bool
Returns true if the union contains no elements.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Union
impl RefUnwindSafe for Union
impl Send for Union
impl Sync for Union
impl Unpin for Union
impl UnwindSafe for Union
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