70 void Reset(
int num_variables);
96 absl::Span<const int64_t> coeffs);
98 absl::Span<const int> refs,
99 absl::Span<const int64_t> coeffs);
101 absl::Span<const int> refs,
102 absl::Span<const int64_t> coeffs);
126 IntegerVariable var)
const;
133 struct IntegerVariableWithRank {
138 bool operator<(
const IntegerVariableWithRank& o)
const {
139 return rank < o.rank;
144 void RefinePartition(std::vector<int>* vars);
147 void MakeRankEqualToStartOfPart(absl::Span<IntegerVariableWithRank> span);
148 void FillTempRanks(
bool reverse_references,
149 absl::Span<const int> enforcements,
150 absl::Span<const int> refs,
151 absl::Span<const int64_t> coeffs);
155 absl::Span<const IntegerVariable> InitialDominatingCandidates(
156 IntegerVariable var)
const;
157 void ProcessTempRanks();
158 void Initialize(absl::Span<IntegerVariableWithRank> span);
161 void FilterUsingTempRanks();
164 void CheckUsingTempRanks();
176 std::vector<IntegerVariableWithRank> tmp_ranks_;
183 std::vector<int> tmp_vars_;
184 std::unique_ptr<SimpleDynamicPartition> partition_;
189 int64_t ct_index_for_signature_ = 0;
193 int num_vars_with_negation_;
198 struct IntegerVariableSpan {
205 std::vector<IntegerVariable> shared_buffer_;
206 util_intops::StrongVector<IntegerVariable, bool> has_initial_candidates_;
207 util_intops::StrongVector<IntegerVariable, IntegerVariableSpan>
212 std::vector<IntegerVariable> buffer_;
213 std::vector<IntegerVariable> other_buffer_;
214 util_intops::StrongVector<IntegerVariable, IntegerVariableSpan>
229 num_locks_.assign(2 * num_variables, 0);
230 locking_ct_index_.assign(2 * num_variables, -1);
234 void CannotDecrease(absl::Span<const int> refs,
int ct_index = -1);
235 void CannotIncrease(absl::Span<const int> refs,
int ct_index = -1);
236 void CannotMove(absl::Span<const int> refs,
int ct_index = -1);
239 template <
typename LinearProto>
242 const LinearProto& linear, int64_t min_activity,
243 int64_t max_activity,
int ct_index = -1);
257 return can_freely_decrease_until_[RefToIntegerVariable(ref)].value();
265 static IntegerVariable RefToIntegerVariable(
int ref) {
272 can_freely_decrease_until_;
282 int num_deleted_constraints_ = 0;