Expand description
Provides the VariableSelector trait which is required
for variable selectors to implement; the main method in this trait relies on
VariableSelector::select_variable.
Furthermore, it defines several implementations of the VariableSelector trait. Any
VariableSelector should only select variables which have a domain of size 2 or larger.
Structs§
- Anti
First Fail - A
VariableSelectorwhich selects the variable with the largest domain (based on the lower-bound and upper-bound, disregarding holes). - Dynamic
Variable Selector - Similar to [
DynamicBrancher], this is a pass-along structure which should be used when aSizedobject is required. - First
Fail - A
VariableSelectorwhich selects the variable with the smallest domain (based on the lower-bound and upper-bound, disregarding holes). - Input
Order - A
VariableSelectorwhich selects the first variable which is not fixed given the order in the provided list. - Largest
- A
VariableSelectorwhich selects the variable with the largest value in its domain. - MaxRegret
- A
VariableSelectorwhich selects the variable with the largest difference between the two smallest values in its domain. - Most
Constrained - A
VariableSelectorwhich selects the variable with the smallest domain (similar to [FirstFail]). - Occurrence
- A
VariableSelectorwhich selects the variable with the largest number of attached constraints (where the providednum_occurrencesstores the number of attached constraints per variable). - Proportional
Domain Size - Random
Selector - A
VariableSelectorwhich selects a random unfixed variable. - Smallest
- A
VariableSelectorwhich selects the variable with the smallest value in its domain.
Traits§
- Variable
Selector - A trait containing the interface for
VariableSelectors, specifying the appropriate hooks into the solver and the methods required for selecting variables.