Skip to main content

TestSolver

Struct TestSolver 

Source
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

Source

pub fn accept_inferences_by(&mut self, inference_code: InferenceCode)

👎Deprecated: Will be replaced by the state API
Source

pub fn new_variable(&mut self, lb: i32, ub: i32) -> DomainId

👎Deprecated: Will be replaced by the state API
Source

pub fn new_sparse_variable(&mut self, values: Vec<i32>) -> DomainId

👎Deprecated: Will be replaced by the state API
Source

pub fn new_literal(&mut self) -> Literal

👎Deprecated: Will be replaced by the state API
Source

pub fn new_propagator<Constructor>( &mut self, constructor: Constructor, ) -> Result<PropagatorId, Conflict>
where Constructor: PropagatorConstructor, <Constructor as PropagatorConstructor>::PropagatorImpl: 'static,

👎Deprecated: Will be replaced by the state API
Source

pub fn contains<Var>(&self, var: Var, value: i32) -> bool
where Var: IntegerVariable,

👎Deprecated: Will be replaced by the state API
Source

pub fn lower_bound(&self, var: DomainId) -> i32

👎Deprecated: Will be replaced by the state API
Source

pub fn remove_and_notify( &mut self, propagator: PropagatorId, var: DomainId, value: i32, ) -> EnqueueDecision

👎Deprecated: Will be replaced by the state API
Source

pub fn increase_lower_bound_and_notify( &mut self, propagator: PropagatorId, _local_id: u32, var: DomainId, value: i32, ) -> EnqueueDecision

👎Deprecated: Will be replaced by the state API
Source

pub fn decrease_upper_bound_and_notify( &mut self, propagator: PropagatorId, _local_id: u32, var: DomainId, value: i32, ) -> EnqueueDecision

👎Deprecated: Will be replaced by the state API
Source

pub fn is_literal_false(&self, literal: Literal) -> bool

👎Deprecated: Will be replaced by the state API
Source

pub fn upper_bound(&self, var: DomainId) -> i32

👎Deprecated: Will be replaced by the state API
Source

pub fn remove(&mut self, var: DomainId, value: i32) -> Result<(), EmptyDomain>

👎Deprecated: Will be replaced by the state API
Source

pub fn set_literal( &mut self, literal: Literal, truth_value: bool, ) -> Result<(), EmptyDomain>

👎Deprecated: Will be replaced by the state API
Source

pub fn propagate(&mut self, propagator: PropagatorId) -> Result<(), Conflict>

👎Deprecated: Will be replaced by the state API
Source

pub fn propagate_until_fixed_point( &mut self, propagator: PropagatorId, ) -> Result<(), Conflict>

👎Deprecated: Will be replaced by the state API
Source

pub fn notify_propagator(&mut self, _propagator: PropagatorId)

👎Deprecated: Will be replaced by the state API
Source

pub fn get_reason_int( &mut self, predicate: Predicate, ) -> PropositionalConjunction

👎Deprecated: Will be replaced by the state API
Source

pub fn get_reason_bool( &mut self, literal: Literal, truth_value: bool, ) -> PropositionalConjunction

👎Deprecated: Will be replaced by the state API
Source

pub fn assert_bounds(&self, var: DomainId, lb: i32, ub: i32)

👎Deprecated: Will be replaced by the state API
Source

pub fn new_constraint_tag(&mut self) -> ConstraintTag

👎Deprecated: Will be replaced by the state API
Source

pub fn new_checkpoint(&mut self)

👎Deprecated: Will be replaced by the state API
Source

pub fn synchronise(&mut self, level: usize)

👎Deprecated: Will be replaced by the state API

Trait Implementations§

Source§

impl Debug for TestSolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for TestSolver

Source§

fn default() -> TestSolver

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V