3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

replace graph by a tree in cheap_eqs

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-06-03 17:15:15 -07:00
parent 5d3070bc2d
commit 62bd19242e
5 changed files with 169 additions and 135 deletions

View file

@ -330,22 +330,7 @@ private:
}
void analyze_eq() {
unsigned x = UINT_MAX, y = UINT_MAX;
unsigned k = 0;
for (const auto& c : m_row) {
if (!m_bp.lp().column_is_fixed(c.var())) {
if (x == UINT_MAX && c.coeff().is_one())
x = k;
else if (y == UINT_MAX && c.coeff().is_minus_one())
y = k;
else
return;
}
k++;
}
if (x == UINT_MAX || y == UINT_MAX)
return;
m_bp.try_create_eq(x, y, m_row_index);
m_bp.try_create_eq(m_row_index);
}
};