pub struct AffineView<Inner> { /* private fields */ }Expand description
Models the constraint y = ax + b, by expressing the domain of y as a transformation of the
domain of x.
Implementations§
Trait Implementations§
Source§impl<Inner: Clone> Clone for AffineView<Inner>
impl<Inner: Clone> Clone for AffineView<Inner>
Source§fn clone(&self) -> AffineView<Inner>
fn clone(&self) -> AffineView<Inner>
Returns a copy 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<Var: Debug> Debug for AffineView<Var>
impl<Var: Debug> Debug for AffineView<Var>
Source§impl<Inner: Hash> Hash for AffineView<Inner>
impl<Inner: Hash> Hash for AffineView<Inner>
Source§impl<View> IntegerVariable for AffineView<View>where
View: IntegerVariable,
impl<View> IntegerVariable for AffineView<View>where
View: IntegerVariable,
type AffineView = AffineView<View>
Source§fn lower_bound(&self, assignment: &AssignmentsInteger) -> i32
fn lower_bound(&self, assignment: &AssignmentsInteger) -> i32
Get the lower bound of the variable.
Source§fn upper_bound(&self, assignment: &AssignmentsInteger) -> i32
fn upper_bound(&self, assignment: &AssignmentsInteger) -> i32
Get the upper bound of the variable.
Source§fn contains(&self, assignment: &AssignmentsInteger, value: i32) -> bool
fn contains(&self, assignment: &AssignmentsInteger, value: i32) -> bool
Determine whether the value is in the domain of this variable.
Source§fn describe_domain(&self, assignment: &AssignmentsInteger) -> Vec<Predicate>
fn describe_domain(&self, assignment: &AssignmentsInteger) -> Vec<Predicate>
Get a predicate description (bounds + holes) of the domain of this variable.
N.B. can be very expensive with large domains, and very large with holey domains Read more
Source§fn remove(
&self,
assignment: &mut AssignmentsInteger,
value: i32,
reason: Option<ReasonRef>,
) -> Result<(), EmptyDomain>
fn remove( &self, assignment: &mut AssignmentsInteger, value: i32, reason: Option<ReasonRef>, ) -> Result<(), EmptyDomain>
Remove a value from the domain of this variable.
Source§fn set_lower_bound(
&self,
assignment: &mut AssignmentsInteger,
value: i32,
reason: Option<ReasonRef>,
) -> Result<(), EmptyDomain>
fn set_lower_bound( &self, assignment: &mut AssignmentsInteger, value: i32, reason: Option<ReasonRef>, ) -> Result<(), EmptyDomain>
Tighten the lower bound of the domain of this variable.
Source§fn set_upper_bound(
&self,
assignment: &mut AssignmentsInteger,
value: i32,
reason: Option<ReasonRef>,
) -> Result<(), EmptyDomain>
fn set_upper_bound( &self, assignment: &mut AssignmentsInteger, value: i32, reason: Option<ReasonRef>, ) -> Result<(), EmptyDomain>
Tighten the upper bound of the domain of this variable.
Source§fn watch_all(
&self,
watchers: &mut Watchers<'_>,
events: EnumSet<IntDomainEvent>,
)
fn watch_all( &self, watchers: &mut Watchers<'_>, events: EnumSet<IntDomainEvent>, )
Register a watch for this variable on the given domain events.
fn watch_all_backtrack( &self, watchers: &mut Watchers<'_>, events: EnumSet<IntDomainEvent>, )
Source§fn unpack_event(&self, event: OpaqueDomainEvent) -> IntDomainEvent
fn unpack_event(&self, event: OpaqueDomainEvent) -> IntDomainEvent
Decode a domain event for this variable.
Source§impl<Inner: PartialEq> PartialEq for AffineView<Inner>
impl<Inner: PartialEq> PartialEq for AffineView<Inner>
Source§impl<Var: PredicateConstructor<Value = i32>> PredicateConstructor for AffineView<Var>
impl<Var: PredicateConstructor<Value = i32>> PredicateConstructor for AffineView<Var>
Source§type Value = <Var as PredicateConstructor>::Value
type Value = <Var as PredicateConstructor>::Value
The value used to represent a bound.
Source§fn lower_bound_predicate(&self, bound: Self::Value) -> Predicate
fn lower_bound_predicate(&self, bound: Self::Value) -> Predicate
Creates a lower-bound predicate (e.g.
[x >= v]).Source§fn upper_bound_predicate(&self, bound: Self::Value) -> Predicate
fn upper_bound_predicate(&self, bound: Self::Value) -> Predicate
Creates an upper-bound predicate (e.g.
[x <= v]).Source§fn equality_predicate(&self, bound: Self::Value) -> Predicate
fn equality_predicate(&self, bound: Self::Value) -> Predicate
Creates an equality predicate (e.g.
[x == v]).Source§fn disequality_predicate(&self, bound: Self::Value) -> Predicate
fn disequality_predicate(&self, bound: Self::Value) -> Predicate
Creates a disequality predicate (e.g.
[x != v]).Source§impl TransformableVariable<AffineView<DomainId>> for DomainId
impl TransformableVariable<AffineView<DomainId>> for DomainId
Source§impl<View> TransformableVariable<AffineView<View>> for AffineView<View>where
View: IntegerVariable,
impl<View> TransformableVariable<AffineView<View>> for AffineView<View>where
View: IntegerVariable,
impl<Inner: Copy> Copy for AffineView<Inner>
impl<Inner: Eq> Eq for AffineView<Inner>
impl<Inner> StructuralPartialEq for AffineView<Inner>
Auto Trait Implementations§
impl<Inner> Freeze for AffineView<Inner>where
Inner: Freeze,
impl<Inner> RefUnwindSafe for AffineView<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for AffineView<Inner>where
Inner: Send,
impl<Inner> Sync for AffineView<Inner>where
Inner: Sync,
impl<Inner> Unpin for AffineView<Inner>where
Inner: Unpin,
impl<Inner> UnwindSafe for AffineView<Inner>where
Inner: 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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