DomainId

Struct DomainId 

Source
pub struct DomainId { /* private fields */ }
Expand description

A structure which represents the most basic IntegerVariable; it is simply the id which links to a domain (hence the name).

Implementations§

Source§

impl DomainId

Source

pub fn new(id: u32) -> DomainId

Source

pub fn id(&self) -> u32

Trait Implementations§

Source§

impl Clone for DomainId

Source§

fn clone(&self) -> DomainId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DomainId

Source§

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

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

impl Display for DomainId

Source§

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

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

impl From<DomainId> for AffineView<DomainId>

Source§

fn from(value: DomainId) -> AffineView<DomainId>

Converts to this type from the input type.
Source§

impl Hash for DomainId

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntegerVariable for DomainId

Source§

type AffineView = AffineView<DomainId>

Source§

fn lower_bound(&self, assignment: &Assignments) -> i32

Get the lower bound of the variable.
Source§

fn lower_bound_at_trail_position( &self, assignment: &Assignments, trail_position: usize, ) -> i32

Get the lower bound of the variable at the given trail position.
Source§

fn upper_bound(&self, assignment: &Assignments) -> i32

Get the upper bound of the variable.
Source§

fn upper_bound_at_trail_position( &self, assignment: &Assignments, trail_position: usize, ) -> i32

Get the upper bound of the variable at the given trail position.
Source§

fn contains(&self, assignment: &Assignments, value: i32) -> bool

Determine whether the value is in the domain of this variable.
Source§

fn contains_at_trail_position( &self, assignment: &Assignments, value: i32, trail_position: usize, ) -> bool

Determine whether the value is in the domain of this variable at the given trail position.
Source§

fn iterate_domain(&self, assignment: &Assignments) -> impl Iterator<Item = i32>

Iterate over the values of the domain.
Source§

fn watch_all(&self, watchers: &mut Watchers<'_>, events: EnumSet<DomainEvent>)

Register a watch for this variable on the given domain events.
Source§

fn watch_all_backtrack( &self, watchers: &mut Watchers<'_>, events: EnumSet<DomainEvent>, )

Source§

fn unpack_event(&self, event: OpaqueDomainEvent) -> DomainEvent

Decode a domain event for this variable.
Source§

fn get_holes_on_current_decision_level( &self, assignments: &Assignments, ) -> impl Iterator<Item = i32>

Returns all of the holes in the domain which were created at the current decision level
Source§

fn get_holes(&self, assignments: &Assignments) -> impl Iterator<Item = i32>

Returns all of the holes in the domain
Source§

impl PartialEq for DomainId

Source§

fn eq(&self, other: &DomainId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PredicateConstructor for DomainId

Source§

type Value = i32

The value used to represent a bound.
Source§

fn equality_predicate( &self, bound: <DomainId as PredicateConstructor>::Value, ) -> Predicate

Creates an equality predicate (e.g. [x == v]).
Source§

fn lower_bound_predicate( &self, bound: <DomainId as PredicateConstructor>::Value, ) -> Predicate

Creates a lower-bound predicate (e.g. [x >= v]).
Source§

fn upper_bound_predicate( &self, bound: <DomainId as PredicateConstructor>::Value, ) -> Predicate

Creates an upper-bound predicate (e.g. [x <= v]).
Source§

fn disequality_predicate( &self, bound: <DomainId as PredicateConstructor>::Value, ) -> Predicate

Creates a disequality predicate (e.g. [x != v]).
Source§

impl StorageKey for DomainId

Source§

impl TransformableVariable<AffineView<DomainId>> for DomainId

Source§

fn scaled(&self, scale: i32) -> AffineView<DomainId>

Get a variable which domain is scaled compared to the domain of self. Read more
Source§

fn offset(&self, offset: i32) -> AffineView<DomainId>

Get a variable which domain has a constant offset to the domain of self.
Source§

impl ValueSelector<DomainId> for InDomainInterval

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

impl ValueSelector<DomainId> for InDomainRandom

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

impl ValueSelector<DomainId> for InDomainSplitRandom

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

impl ValueSelector<DomainId> for OutDomainMax

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

impl ValueSelector<DomainId> for OutDomainMedian

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

impl ValueSelector<DomainId> for OutDomainMin

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

impl ValueSelector<DomainId> for OutDomainRandom

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

impl ValueSelector<DomainId> for RandomSplitter

Source§

fn select_value( &mut self, context: &mut SelectionContext<'_>, decision_variable: DomainId, ) -> 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

This method returns whether a restart is currently pointless for the ValueSelector. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular ValueSelector. Read more
Source§

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

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

impl<TieBreaking> VariableSelector<DomainId> for AntiFirstFail<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, i32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for FirstFail<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, i32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl VariableSelector<DomainId> for InputOrder<DomainId>

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for Largest<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, i32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for MaxRegret<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, i32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for MostConstrained<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, MostConstrainedValue>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for Occurrence<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, u32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl VariableSelector<DomainId> for ProportionalDomainSize

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl VariableSelector<DomainId> for RandomSelector

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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_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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

fn subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

impl<TieBreaking> VariableSelector<DomainId> for Smallest<DomainId, TieBreaking>
where TieBreaking: TieBreaker<DomainId, i32>,

Source§

fn select_variable( &mut self, context: &mut SelectionContext<'_>, ) -> Option<DomainId>

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 subscribe_to_events(&self) -> Vec<BrancherEvent>

Indicates which BrancherEvent are relevant for this particular VariableSelector. Read more
Source§

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

fn on_backtrack(&mut self)

A function which is called whenever a backtrack occurs in the solver. Read more
Source§

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. This method could thus be called multiple times in a single backtracking operation by the solver. Read more
Source§

fn on_appearance_in_conflict_predicate(&mut self, _predicate: Predicate)

A function which is called when a Predicate appears in a conflict during conflict analysis. Read more
Source§

fn is_restart_pointless(&mut self) -> bool

This method returns whether a restart is currently pointless for the VariableSelector. Read more
Source§

impl Copy for DomainId

Source§

impl Eq for DomainId

Source§

impl StructuralPartialEq for DomainId

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

Source§

type Proj<U: 'src> = U

Source§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

Source§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
Source§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
Source§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
Source§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
Source§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a MaybeRef.
Source§

impl<Value> Statistic for Value
where Value: Display,

Source§

fn log(&self, statistic_logger: StatisticLogger)

Logs the Statistic using the provided StatisticLogger.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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

Source§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,