mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 05:43:39 +00:00
fix a bug in column patching
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
7a950dd667
commit
9be7bda69a
2 changed files with 3 additions and 3 deletions
|
@ -2399,7 +2399,7 @@ bool lar_solver::try_to_patch(lpvar j, const mpq& val, std::function<bool (lpvar
|
||||||
if (!inside_bounds(j, ival))
|
if (!inside_bounds(j, ival))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
impq delta = ival - get_column_value(j);
|
impq delta = get_column_value(j) - ival;
|
||||||
for (const auto &c : A_r().column(j)) {
|
for (const auto &c : A_r().column(j)) {
|
||||||
unsigned row_index = c.var();
|
unsigned row_index = c.var();
|
||||||
const mpq & a = c.coeff();
|
const mpq & a = c.coeff();
|
||||||
|
@ -2416,7 +2416,7 @@ bool lar_solver::try_to_patch(lpvar j, const mpq& val, std::function<bool (lpvar
|
||||||
unsigned row_index = c.var();
|
unsigned row_index = c.var();
|
||||||
const mpq & a = c.coeff();
|
const mpq & a = c.coeff();
|
||||||
unsigned rj = m_mpq_lar_core_solver.m_r_basis[row_index];
|
unsigned rj = m_mpq_lar_core_solver.m_r_basis[row_index];
|
||||||
set_column_value(rj,a * delta + get_column_value(rj));
|
m_mpq_lar_core_solver.m_r_solver.add_delta_to_x(rj, a * delta);
|
||||||
report_change(rj);
|
report_change(rj);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue