add MakeAllDifferent api without range parameter
This commit is contained in:
@@ -423,6 +423,10 @@ bool BoundsAllDifferent::PropagateMax() {
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Constraint* Solver::MakeAllDifferent(const std::vector<IntVar*>& vars) {
|
||||
return MakeAllDifferent(vars.data(), vars.size(), true);
|
||||
}
|
||||
|
||||
Constraint* Solver::MakeAllDifferent(const std::vector<IntVar*>& vars, bool range) {
|
||||
return MakeAllDifferent(vars.data(), vars.size(), range);
|
||||
}
|
||||
|
||||
@@ -1534,8 +1534,12 @@ class Solver {
|
||||
int64 total_sum);
|
||||
|
||||
// All variables are pairwise different.
|
||||
Constraint* MakeAllDifferent(const std::vector<IntVar*>& vars);
|
||||
// All variables are pairwise different. If 'range' is true,
|
||||
// stronger , and potentially slower propagation will occur.
|
||||
Constraint* MakeAllDifferent(const std::vector<IntVar*>& vars, bool range);
|
||||
// All variables are pairwise different.
|
||||
// All variables are pairwise different. If 'range' is true,
|
||||
// stronger , and potentially slower propagation will occur.
|
||||
Constraint* MakeAllDifferent(const IntVar* const* vars,
|
||||
int size, bool range);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user