pub struct PropositionalVariable { /* private fields */ }Expand description
A boolean variable in the solver; unlike Literal, this representation does not use a
polarity.
Implementations§
Trait Implementations§
source§impl Clone for PropositionalVariable
impl Clone for PropositionalVariable
source§fn clone(&self) -> PropositionalVariable
fn clone(&self) -> PropositionalVariable
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 Debug for PropositionalVariable
impl Debug for PropositionalVariable
source§impl Display for PropositionalVariable
impl Display for PropositionalVariable
source§impl Hash for PropositionalVariable
impl Hash for PropositionalVariable
source§impl PartialEq for PropositionalVariable
impl PartialEq for PropositionalVariable
source§impl StorageKey for PropositionalVariable
impl StorageKey for PropositionalVariable
source§impl ValueSelector<PropositionalVariable> for InDomainMax
impl ValueSelector<PropositionalVariable> for InDomainMax
source§fn select_value(
&mut self,
_context: &mut SelectionContext<'_>,
decision_variable: PropositionalVariable,
) -> Predicate
fn select_value( &mut self, _context: &mut SelectionContext<'_>, decision_variable: PropositionalVariable, ) -> Predicate
Determines which value in the domain of
decision_variable to branch next on.
The domain of the decision_variable variable should have at least 2 values in it (as it
otherwise should not have been selected as decision_variable). Returns a Predicate
specifying the required change in the domain.source§fn on_unassign_literal(&mut self, _literal: Literal)
fn on_unassign_literal(&mut self, _literal: Literal)
source§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
A function which is called after a
DomainId is unassigned during backtracking (i.e. when
it was fixed but is no longer), specifically, it provides variable which is the
DomainId which has been reset and value which is the value to which the variable was
previously fixed. This method could thus be called multiple times in a single
backtracking operation by the solver.source§fn on_solution(&mut self, _solution: SolutionReference<'_>)
fn on_solution(&mut self, _solution: SolutionReference<'_>)
This method is called when a solution is found; either when iterating over all solutions in
the case of a satisfiable problem or on solutions of increasing quality when solving an
optimisation problem.
source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
ValueSelector. Read moresource§impl ValueSelector<PropositionalVariable> for InDomainMin
impl ValueSelector<PropositionalVariable> for InDomainMin
source§fn select_value(
&mut self,
_context: &mut SelectionContext<'_>,
decision_variable: PropositionalVariable,
) -> Predicate
fn select_value( &mut self, _context: &mut SelectionContext<'_>, decision_variable: PropositionalVariable, ) -> Predicate
Determines which value in the domain of
decision_variable to branch next on.
The domain of the decision_variable variable should have at least 2 values in it (as it
otherwise should not have been selected as decision_variable). Returns a Predicate
specifying the required change in the domain.source§fn on_unassign_literal(&mut self, _literal: Literal)
fn on_unassign_literal(&mut self, _literal: Literal)
source§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
A function which is called after a
DomainId is unassigned during backtracking (i.e. when
it was fixed but is no longer), specifically, it provides variable which is the
DomainId which has been reset and value which is the value to which the variable was
previously fixed. This method could thus be called multiple times in a single
backtracking operation by the solver.source§fn on_solution(&mut self, _solution: SolutionReference<'_>)
fn on_solution(&mut self, _solution: SolutionReference<'_>)
This method is called when a solution is found; either when iterating over all solutions in
the case of a satisfiable problem or on solutions of increasing quality when solving an
optimisation problem.
source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
ValueSelector. Read moresource§impl ValueSelector<PropositionalVariable> for InDomainRandom
impl ValueSelector<PropositionalVariable> for InDomainRandom
source§fn select_value(
&mut self,
context: &mut SelectionContext<'_>,
decision_variable: PropositionalVariable,
) -> Predicate
fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: PropositionalVariable, ) -> Predicate
Determines which value in the domain of
decision_variable to branch next on.
The domain of the decision_variable variable should have at least 2 values in it (as it
otherwise should not have been selected as decision_variable). Returns a Predicate
specifying the required change in the domain.source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
ValueSelector. Read moresource§fn on_unassign_literal(&mut self, _literal: Literal)
fn on_unassign_literal(&mut self, _literal: Literal)
source§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
A function which is called after a
DomainId is unassigned during backtracking (i.e. when
it was fixed but is no longer), specifically, it provides variable which is the
DomainId which has been reset and value which is the value to which the variable was
previously fixed. This method could thus be called multiple times in a single
backtracking operation by the solver.source§fn on_solution(&mut self, _solution: SolutionReference<'_>)
fn on_solution(&mut self, _solution: SolutionReference<'_>)
This method is called when a solution is found; either when iterating over all solutions in
the case of a satisfiable problem or on solutions of increasing quality when solving an
optimisation problem.
source§impl ValueSelector<PropositionalVariable> for PhaseSaving<PropositionalVariable, bool>
impl ValueSelector<PropositionalVariable> for PhaseSaving<PropositionalVariable, bool>
source§fn select_value(
&mut self,
_: &mut SelectionContext<'_>,
decision_variable: PropositionalVariable,
) -> Predicate
fn select_value( &mut self, _: &mut SelectionContext<'_>, decision_variable: PropositionalVariable, ) -> Predicate
Determines which value in the domain of
decision_variable to branch next on.
The domain of the decision_variable variable should have at least 2 values in it (as it
otherwise should not have been selected as decision_variable). Returns a Predicate
specifying the required change in the domain.source§fn on_unassign_literal(&mut self, lit: Literal)
fn on_unassign_literal(&mut self, lit: Literal)
source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
ValueSelector. Read moresource§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
A function which is called after a
DomainId is unassigned during backtracking (i.e. when
it was fixed but is no longer), specifically, it provides variable which is the
DomainId which has been reset and value which is the value to which the variable was
previously fixed. This method could thus be called multiple times in a single
backtracking operation by the solver.source§fn on_solution(&mut self, _solution: SolutionReference<'_>)
fn on_solution(&mut self, _solution: SolutionReference<'_>)
This method is called when a solution is found; either when iterating over all solutions in
the case of a satisfiable problem or on solutions of increasing quality when solving an
optimisation problem.
source§impl<BackupSelector> ValueSelector<PropositionalVariable> for SolutionGuidedValueSelector<PropositionalVariable, bool, BackupSelector>where
BackupSelector: ValueSelector<PropositionalVariable>,
impl<BackupSelector> ValueSelector<PropositionalVariable> for SolutionGuidedValueSelector<PropositionalVariable, bool, BackupSelector>where
BackupSelector: ValueSelector<PropositionalVariable>,
source§fn select_value(
&mut self,
context: &mut SelectionContext<'_>,
decision_variable: PropositionalVariable,
) -> Predicate
fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: PropositionalVariable, ) -> Predicate
Determines which value in the domain of
decision_variable to branch next on.
The domain of the decision_variable variable should have at least 2 values in it (as it
otherwise should not have been selected as decision_variable). Returns a Predicate
specifying the required change in the domain.source§fn on_solution(&mut self, solution: SolutionReference<'_>)
fn on_solution(&mut self, solution: SolutionReference<'_>)
This method is called when a solution is found; either when iterating over all solutions in
the case of a satisfiable problem or on solutions of increasing quality when solving an
optimisation problem.
source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
ValueSelector. Read moresource§fn on_unassign_literal(&mut self, _literal: Literal)
fn on_unassign_literal(&mut self, _literal: Literal)
source§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
A function which is called after a
DomainId is unassigned during backtracking (i.e. when
it was fixed but is no longer), specifically, it provides variable which is the
DomainId which has been reset and value which is the value to which the variable was
previously fixed. This method could thus be called multiple times in a single
backtracking operation by the solver.source§impl VariableSelector<PropositionalVariable> for InputOrder<PropositionalVariable>
impl VariableSelector<PropositionalVariable> for InputOrder<PropositionalVariable>
source§fn select_variable(
&mut self,
context: &SelectionContext<'_>,
) -> Option<PropositionalVariable>
fn select_variable( &mut self, context: &SelectionContext<'_>, ) -> Option<PropositionalVariable>
Determines which variable to select next if there are any left to branch on.
Should only return
None when all variables which have been passed to the
VariableSelector have been assigned. Otherwise it should return the variable to
branch on next.source§fn on_conflict(&mut self)
fn on_conflict(&mut self)
A function which is called after a conflict has been found and processed but (currently)
does not provide any additional information.
source§fn on_unassign_literal(&mut self, _literal: Literal)
fn on_unassign_literal(&mut self, _literal: Literal)
source§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
source§fn on_appearance_in_conflict_literal(&mut self, _literal: Literal)
fn on_appearance_in_conflict_literal(&mut self, _literal: Literal)
A function which is called when a
Literal appears in a conflict during conflict
analysis.source§fn on_appearance_in_conflict_integer(&mut self, _variable: DomainId)
fn on_appearance_in_conflict_integer(&mut self, _variable: DomainId)
A function which is called when a variable appears in a conflict during conflict analysis.
source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
VariableSelector. Read moresource§impl VariableSelector<PropositionalVariable> for Vsids<PropositionalVariable>
impl VariableSelector<PropositionalVariable> for Vsids<PropositionalVariable>
source§fn select_variable(
&mut self,
context: &SelectionContext<'_>,
) -> Option<PropositionalVariable>
fn select_variable( &mut self, context: &SelectionContext<'_>, ) -> Option<PropositionalVariable>
Determines which variable to select next if there are any left to branch on.
Should only return
None when all variables which have been passed to the
VariableSelector have been assigned. Otherwise it should return the variable to
branch on next.source§fn on_conflict(&mut self)
fn on_conflict(&mut self)
A function which is called after a conflict has been found and processed but (currently)
does not provide any additional information.
source§fn on_unassign_literal(&mut self, literal: Literal)
fn on_unassign_literal(&mut self, literal: Literal)
source§fn on_appearance_in_conflict_literal(&mut self, literal: Literal)
fn on_appearance_in_conflict_literal(&mut self, literal: Literal)
A function which is called when a
Literal appears in a conflict during conflict
analysis.source§fn is_restart_pointless(&mut self) -> bool
fn is_restart_pointless(&mut self) -> bool
This method returns whether a restart is currently pointless for the
VariableSelector. Read moresource§fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
fn on_unassign_integer(&mut self, _variable: DomainId, _value: i32)
source§fn on_appearance_in_conflict_integer(&mut self, _variable: DomainId)
fn on_appearance_in_conflict_integer(&mut self, _variable: DomainId)
A function which is called when a variable appears in a conflict during conflict analysis.
impl Copy for PropositionalVariable
impl Eq for PropositionalVariable
impl StructuralPartialEq for PropositionalVariable
Auto Trait Implementations§
impl Freeze for PropositionalVariable
impl RefUnwindSafe for PropositionalVariable
impl Send for PropositionalVariable
impl Sync for PropositionalVariable
impl Unpin for PropositionalVariable
impl UnwindSafe for PropositionalVariable
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 moresource§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.