mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 11:25:51 +00:00
round the bound for columns and terms when it can be deduced that they are integral
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
b403b96d38
commit
6ea0bcb454
4 changed files with 43 additions and 12 deletions
|
@ -50,7 +50,7 @@ namespace lp {
|
|||
m_constraints_for_explanation.push_back(ci);
|
||||
|
||||
for (const auto &p : *t) {
|
||||
m_var_register.add_var(p.var());
|
||||
m_var_register.add_var(p.var(), true); // hnf only deals with integral variables for now
|
||||
mpq t = abs(ceil(p.coeff()));
|
||||
if (t > m_abs_max)
|
||||
m_abs_max = t;
|
||||
|
@ -63,7 +63,7 @@ namespace lp {
|
|||
|
||||
void hnf_cutter::initialize_row(unsigned i) {
|
||||
mpq sign = m_terms_upper[i]? one_of_type<mpq>(): - one_of_type<mpq>();
|
||||
m_A.init_row_from_container(i, * m_terms[i], [this](unsigned j) { return m_var_register.add_var(j);}, sign);
|
||||
m_A.init_row_from_container(i, * m_terms[i], [this](unsigned j) { return m_var_register.add_var(j, true);}, sign);// hnf only deals with integral variables for now
|
||||
}
|
||||
|
||||
void hnf_cutter::init_matrix_A() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue