Expand description
Provides the ValueSelector trait which is required
for value selectors to implement; the main method in this trait relies on
ValueSelector::select_value.
Furthermore, it defines several implementations of the ValueSelector trait. Any
ValueSelector should only select values which are in the domain of the provided variable.
Structs§
- Dynamic
Value Selector - Similar to [
DynamicBrancher], this is a pass-along structure which should be used when aSizedobject is required. - InDomain
Interval - Reduces the domain (consisting of intervals) to its first interval.
- InDomain
Max ValueSelectorwhich chooses to assign the provided variable to its upper-bound.- InDomain
Median - A
ValueSelectorwhich selects the median value in the domain (or if this value is already assigned then the closest variable to it in terms of index). - InDomain
Middle - A
ValueSelectorwhich selects the middle value in the domain (or if this value is already assigned then the closest variable to it). - InDomain
Min ValueSelectorwhich chooses to assign the provided variable to its lowest-bound.- InDomain
Random - A
ValueSelectorwhich assigns to a random value in the domain. - InDomain
Split - A
ValueSelectorwhich splits the domain in half (based on the lower-bound and upper-bound, disregarding holes) and removes the upper-half from the domain. - InDomain
Split Random - A
ValueSelectorwhich bisects the domain in the middle (between the lower-bound and lower-bound, disregarding holes), randomly selecting whether to exclude the lower-half or the upper-half. - OutDomain
Max - A
ValueSelectorwhich excludes the largest value from the domain. - OutDomain
Median - A
ValueSelectorwhich excludes the median value from the domain. - OutDomain
Min - A
ValueSelectorwhich excludes the smallest value from the domain. - OutDomain
Random - A
ValueSelectorwhich excludes a random value from the domain. - Random
Splitter - A
ValueSelectorwhich splits the domain in a random manner (between the lower-bound and lower-bound, disregarding holes), randomly selecting whether to exclude the lower-half or the upper-half. - Reverse
InDomain Split - A
ValueSelectorwhich splits the domain in half (based on the lower-bound and upper-bound, disregarding holes) and removes the lower-half from the domain.
Traits§
- Value
Selector - A trait containing the interface for
ValueSelectors, specifying the appropriate hooks into the solver and the methods required for selecting a value for a given variable.