14 #ifndef OR_TOOLS_FLATZINC_PRESOLVE_H_
15 #define OR_TOOLS_FLATZINC_PRESOLVE_H_
20 #include "absl/container/flat_hash_map.h"
21 #include "absl/container/flat_hash_set.h"
22 #include "absl/strings/match.h"
48 struct AffineMapping {
55 : variable(
nullptr),
coefficient(0), offset(0), constraint(
nullptr) {}
65 struct Array2DIndexMapping {
77 constraint(
nullptr) {}
99 void UpdateRuleStats(
const std::string& rule_name) {
100 successful_rules_[rule_name]++;
111 absl::flat_hash_map<const IntegerVariable*, IntegerVariable*>
112 var_representative_map_;
113 std::vector<IntegerVariable*> var_representative_vector_;
116 absl::flat_hash_map<const IntegerVariable*, AffineMapping> affine_map_;
119 absl::flat_hash_map<const IntegerVariable*, Array2DIndexMapping>
124 std::map<std::string, int> successful_rules_;
129 #endif // OR_TOOLS_FLATZINC_PRESOLVE_H_