C++ Reference: class AllDifferentBoundsPropagator

This documentation is automatically generated.

Implement the all different bound consistent propagator with explanation. That is, given n variables that must be all different, this propagates the bounds of each variables as much as possible. The key is to detect the so called Hall interval which are interval of size k that contains the domain of k variables. Because all the variables must take different values, we can deduce that the domain of the other variables cannot contains such Hall interval.

We use a "fast" O(n log n) algorithm.

TODO(user): It might be difficult to find something faster than what is implemented here. Some related reference: https://cs.uwaterloo.ca/~vanbeek/Publications/ijcai03_TR.pdf

Arguments: const std::vector<IntegerVariable>& vars, IntegerTrail* integer_trail


Return type: bool


Return type: void

Arguments: GenericLiteralWatcher* watcher