pub struct TestSolver {
pub state: State,
pub nogood_handle: PropagatorHandle<NogoodPropagator>,
/* private fields */
}Expand description
A container for CP variables, which can be used to test propagators.
Fields§
§state: State§nogood_handle: PropagatorHandle<NogoodPropagator>Implementations§
Source§impl TestSolver
impl TestSolver
pub fn accept_inferences_by(&mut self, inference_code: InferenceCode)
Will be replaced by the state API
pub fn new_variable(&mut self, lb: i32, ub: i32) -> DomainId
Will be replaced by the state API
pub fn new_sparse_variable(&mut self, values: Vec<i32>) -> DomainId
Will be replaced by the state API
pub fn new_literal(&mut self) -> Literal
Will be replaced by the state API
pub fn new_propagator<Constructor>(
&mut self,
constructor: Constructor,
) -> Result<PropagatorId, Conflict>where
Constructor: PropagatorConstructor,
<Constructor as PropagatorConstructor>::PropagatorImpl: 'static,
Will be replaced by the state API
pub fn contains<Var>(&self, var: Var, value: i32) -> boolwhere
Var: IntegerVariable,
Will be replaced by the state API
pub fn lower_bound(&self, var: DomainId) -> i32
Will be replaced by the state API
pub fn remove_and_notify( &mut self, propagator: PropagatorId, var: DomainId, value: i32, ) -> EnqueueDecision
Will be replaced by the state API
pub fn increase_lower_bound_and_notify( &mut self, propagator: PropagatorId, _local_id: u32, var: DomainId, value: i32, ) -> EnqueueDecision
Will be replaced by the state API
pub fn decrease_upper_bound_and_notify( &mut self, propagator: PropagatorId, _local_id: u32, var: DomainId, value: i32, ) -> EnqueueDecision
Will be replaced by the state API
pub fn is_literal_false(&self, literal: Literal) -> bool
Will be replaced by the state API
pub fn upper_bound(&self, var: DomainId) -> i32
Will be replaced by the state API
pub fn remove( &mut self, var: DomainId, value: i32, ) -> Result<(), EmptyDomainConflict>
Will be replaced by the state API
pub fn set_literal( &mut self, literal: Literal, truth_value: bool, ) -> Result<(), EmptyDomain>
Will be replaced by the state API
pub fn propagate(&mut self, propagator: PropagatorId) -> Result<(), Conflict>
Will be replaced by the state API
pub fn propagate_until_fixed_point( &mut self, propagator: PropagatorId, ) -> Result<(), Conflict>
Will be replaced by the state API
pub fn notify_propagator(&mut self, _propagator: PropagatorId)
Will be replaced by the state API
pub fn get_reason_int( &mut self, predicate: Predicate, ) -> PropositionalConjunction
Will be replaced by the state API
pub fn get_reason_bool( &mut self, literal: Literal, truth_value: bool, ) -> PropositionalConjunction
Will be replaced by the state API
pub fn assert_bounds(&self, var: DomainId, lb: i32, ub: i32)
Will be replaced by the state API
pub fn new_constraint_tag(&mut self) -> ConstraintTag
Will be replaced by the state API
pub fn new_checkpoint(&mut self)
Will be replaced by the state API
pub fn synchronise(&mut self, level: usize)
Will be replaced by the state API
Trait Implementations§
Source§impl Debug for TestSolver
impl Debug for TestSolver
Source§impl Default for TestSolver
impl Default for TestSolver
Source§fn default() -> TestSolver
fn default() -> TestSolver
Auto Trait Implementations§
impl !RefUnwindSafe for TestSolver
impl !Send for TestSolver
impl !Sync for TestSolver
impl !UnwindSafe for TestSolver
impl Freeze for TestSolver
impl Unpin for TestSolver
impl UnsafeUnpin for TestSolver
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
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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&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> 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>
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>
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