@@ -32,7 +32,6 @@ template <typename C, typename B> // C plays a role of a container, B - lp_bound
32
32
class bound_analyzer_on_row {
33
33
const C& m_row;
34
34
B & m_bp;
35
- unsigned m_row_index;
36
35
int m_column_of_u; // index of an unlimited from above monoid
37
36
// -1 means that such a value is not found, -2 means that at least two of such monoids were found
38
37
int m_column_of_l; // index of an unlimited from below monoid
@@ -43,12 +42,10 @@ public :
43
42
bound_analyzer_on_row (
44
43
const C & it,
45
44
const numeric_pair<mpq>& rs,
46
- unsigned row_or_term_index,
47
45
B & bp)
48
46
:
49
47
m_row (it),
50
48
m_bp (bp),
51
- m_row_index (row_or_term_index),
52
49
m_column_of_u (-1 ),
53
50
m_column_of_l (-1 ),
54
51
m_rs (rs)
@@ -57,9 +54,8 @@ public :
57
54
58
55
static unsigned analyze_row (const C & row,
59
56
const numeric_pair<mpq>& rs,
60
- unsigned row_or_term_index,
61
57
B & bp) {
62
- bound_analyzer_on_row a (row, rs, row_or_term_index, bp);
58
+ bound_analyzer_on_row a (row, rs, bp);
63
59
return a.analyze ();
64
60
}
65
61
@@ -281,16 +277,16 @@ public :
281
277
282
278
void limit_j (unsigned bound_j, const mpq& u, bool coeff_before_j_is_pos, bool is_lower_bound, bool strict)
283
279
{
284
- unsigned row_index = this ->m_row_index ;
285
280
auto * lar = &m_bp.lp ();
286
- auto explain = [bound_j, coeff_before_j_is_pos, is_lower_bound, strict, row_index, lar]() {
281
+ const auto & row = this ->m_row ;
282
+ auto explain = [row, bound_j, coeff_before_j_is_pos, is_lower_bound, strict, lar]() {
287
283
(void ) strict;
288
- TRACE (" bound_analyzer" , tout << " explain_bound_on_var_on_coeff, bound_j = " << bound_j << " , coeff_before_j_is_pos = " << coeff_before_j_is_pos << " , is_lower_bound = " << is_lower_bound << " , strict = " << strict << " , row_index = " << row_index << " \n " ;);
284
+ TRACE (" bound_analyzer" , tout << " explain_bound_on_var_on_coeff, bound_j = " << bound_j << " , coeff_before_j_is_pos = " << coeff_before_j_is_pos << " , is_lower_bound = " << is_lower_bound << " , strict = " << strict << " \n " ;);
289
285
int bound_sign = (is_lower_bound ? 1 : -1 );
290
286
int j_sign = (coeff_before_j_is_pos ? 1 : -1 ) * bound_sign;
291
287
292
288
u_dependency* ret = nullptr ;
293
- for (auto const & r : lar-> get_row (row_index) ) {
289
+ for (auto const & r : row ) {
294
290
unsigned j = r.var ();
295
291
if (j == bound_j)
296
292
continue ;
0 commit comments