14 #ifndef OR_TOOLS_SAT_IMPLIED_BOUNDS_H_ 15 #define OR_TOOLS_SAT_IMPLIED_BOUNDS_H_ 21 #include "absl/container/flat_hash_map.h" 119 const auto it = literal_to_var_to_value_.find(
literal.Index());
120 return it != literal_to_var_to_value_.end() ? it->second
121 : empty_var_to_value_;
144 std::vector<IntegerLiteral> tmp_integer_literals_;
152 absl::flat_hash_map<std::pair<LiteralIndex, IntegerVariable>, IntegerValue>
160 std::vector<ImpliedBoundEntry> empty_implied_bounds_;
168 absl::flat_hash_map<LiteralIndex,
169 absl::flat_hash_map<IntegerVariable, IntegerValue>>
170 literal_to_var_to_value_;
171 const absl::flat_hash_map<IntegerVariable, IntegerValue> empty_var_to_value_;
179 int64_t num_deductions_ = 0;
180 int64_t num_enqueued_in_var_to_bounds_ = 0;
186 #endif // OR_TOOLS_SAT_IMPLIED_BOUNDS_H_
Class that owns everything related to a particular optimization model.
void Add(Literal literal, IntegerLiteral integer_literal)
IntegerVariable literal_view
void AddLiteralImpliesVarEqValue(Literal literal, IntegerVariable var, IntegerValue value)
const std::vector< IntegerVariable > & VariablesWithImpliedBounds() const
void ProcessIntegerTrail(Literal first_decision)
ImpliedBounds(Model *model)
const std::vector< ImpliedBoundEntry > & GetImpliedBounds(IntegerVariable var)
void NotifyNewIntegerView(Literal literal)
const std::vector< IntegerType > & PositionsSetAtLeastOnce() const
Collection of objects used to extend the Constraint Solver library.
const IntegerVariable kNoIntegerVariable(-1)
ImpliedBoundEntry(IntegerVariable lit, IntegerValue lb, bool positive)
bool EnqueueNewDeductions()
const absl::flat_hash_map< IntegerVariable, IntegerValue > & GetImpliedValues(Literal literal) const