pub enum IntDom<N> {
BTree(BTreeDom<N>),
Minimal(MinimalDom<N>),
Range(RangeDom<N>),
}Expand description
An enum representing all the builtin integer domains.
Variants§
Implementations§
Source§impl<N: Int> IntDom<N>
impl<N: Int> IntDom<N>
pub fn btree_from_bounds(min: N, max: N) -> Self
pub fn range_from_bounds(min: N, max: N) -> Self
Trait Implementations§
Source§impl<N: Int> IntDomain for IntDom<N>
impl<N: Int> IntDomain for IntDom<N>
Source§fn from_bounds(min: N, max: N) -> Self
fn from_bounds(min: N, max: N) -> Self
Creates a new domain equivalent to the inclusive range
min..=max. Read moreSource§fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = N> + 'a>
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = N> + 'a>
Returns an iterator over all the values in the domain. Read more
Source§fn is_assigned(&self) -> bool
fn is_assigned(&self) -> bool
Checks if the domain is assigned. Read more
Source§fn value(&self) -> Option<N>
fn value(&self) -> Option<N>
Returns the value of the domain if the domain is assigned, or
None otherwise. Read moreSource§fn min(&self) -> Option<N>
fn min(&self) -> Option<N>
Returns the minimum value in the domain, or
None if the domain is empty. Read moreSource§fn max(&self) -> Option<N>
fn max(&self) -> Option<N>
Returns the maximum value in the domain, or
None if the domain is empty. Read moreSource§fn adjust_min(&mut self, new_min: N)
fn adjust_min(&mut self, new_min: N)
Sets the new minimum value for the domain. Read more
Source§fn adjust_max(&mut self, new_max: N)
fn adjust_max(&mut self, new_max: N)
Sets the new maximum value for the domain. Read more
Auto Trait Implementations§
impl<N> Freeze for IntDom<N>where
N: Freeze,
impl<N> RefUnwindSafe for IntDom<N>where
N: RefUnwindSafe,
impl<N> Send for IntDom<N>where
N: Send,
impl<N> Sync for IntDom<N>where
N: Sync,
impl<N> Unpin for IntDom<N>where
N: Unpin,
impl<N> UnwindSafe for IntDom<N>where
N: UnwindSafe + RefUnwindSafe,
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