pub struct Predicate { /* private fields */ }Expand description
Representation of a domain operation, also known as an atomic constraint. It is a triple
(DomainId, PredicateType, value).
To create a Predicate, use Predicate::new or the more concise predicate! macro.
Implementations§
Source§impl Predicate
impl Predicate
Sourcepub fn new(id: DomainId, predicate_type: PredicateType, value: i32) -> Predicate
pub fn new(id: DomainId, predicate_type: PredicateType, value: i32) -> Predicate
Creates a new Predicate (also known as atomic constraint) which represents a domain
operation.
pub fn get_predicate_type(&self) -> PredicateType
Source§impl Predicate
impl Predicate
pub fn is_equality_predicate(&self) -> bool
pub fn is_lower_bound_predicate(&self) -> bool
pub fn is_upper_bound_predicate(&self) -> bool
pub fn is_not_equal_predicate(&self) -> bool
Sourcepub fn get_domain(&self) -> DomainId
pub fn get_domain(&self) -> DomainId
pub fn get_right_hand_side(&self) -> i32
pub fn trivially_true() -> Predicate
pub fn trivially_false() -> Predicate
Trait Implementations§
Source§impl Extend<Predicate> for PropositionalConjunction
impl Extend<Predicate> for PropositionalConjunction
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Predicate>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Predicate>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<Predicate> for PredicateType
impl From<Predicate> for PredicateType
Source§fn from(value: Predicate) -> PredicateType
fn from(value: Predicate) -> PredicateType
Converts to this type from the input type.
Source§impl From<Predicate> for PropositionalConjunction
impl From<Predicate> for PropositionalConjunction
Source§fn from(predicate: Predicate) -> PropositionalConjunction
fn from(predicate: Predicate) -> PropositionalConjunction
Converts to this type from the input type.
Source§impl FromIterator<Predicate> for PropositionalConjunction
impl FromIterator<Predicate> for PropositionalConjunction
Source§fn from_iter<T>(iter: T) -> PropositionalConjunctionwhere
T: IntoIterator<Item = Predicate>,
fn from_iter<T>(iter: T) -> PropositionalConjunctionwhere
T: IntoIterator<Item = Predicate>,
Creates a value from an iterator. Read more
impl Copy for Predicate
impl Eq for Predicate
impl StructuralPartialEq for Predicate
Auto Trait Implementations§
impl Freeze for Predicate
impl RefUnwindSafe for Predicate
impl Send for Predicate
impl Sync for Predicate
impl Unpin for Predicate
impl UnwindSafe for Predicate
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<Value> Statistic for Valuewhere
Value: Display,
impl<Value> Statistic for Valuewhere
Value: Display,
Source§fn log(&self, statistic_logger: StatisticLogger)
fn log(&self, statistic_logger: StatisticLogger)
Logs the
Statistic using the provided StatisticLogger.