mirror of
https://github.com/Z3Prover/z3
synced 2025-08-28 05:58:55 +00:00
Merge branch 'master' into polysat
This commit is contained in:
commit
8bde66420a
36 changed files with 292 additions and 225 deletions
|
@ -1034,14 +1034,10 @@ namespace lp {
|
|||
r += p.coeff() * get_value(p.column());
|
||||
return r;
|
||||
}
|
||||
|
||||
impq lar_solver::get_tv_ivalue(tv const& t) const {
|
||||
if (t.is_var())
|
||||
return get_column_value(t.column());
|
||||
impq r;
|
||||
for (lar_term::ival p : get_term(t))
|
||||
r += p.coeff() * get_column_value(p.column());
|
||||
return r;
|
||||
//fetches the cached value of the term or the variable by the given index
|
||||
const impq& lar_solver::get_tv_ivalue(tv const& t) const {
|
||||
unsigned j = t.is_var()? (unsigned)t.column(): this->map_term_index_to_column_index(t.index());
|
||||
return this->get_column_value(j);
|
||||
}
|
||||
|
||||
void lar_solver::get_rid_of_inf_eps() {
|
||||
|
|
|
@ -506,7 +506,7 @@ public:
|
|||
bool init_model() const;
|
||||
mpq get_value(column_index const& j) const;
|
||||
mpq get_tv_value(tv const& t) const;
|
||||
impq get_tv_ivalue(tv const& t) const;
|
||||
const impq & get_tv_ivalue(tv const& t) const;
|
||||
void get_model(std::unordered_map<var_index, mpq> & variable_values) const;
|
||||
void get_rid_of_inf_eps();
|
||||
void get_model_do_not_care_about_diff_vars(std::unordered_map<var_index, mpq> & variable_values) const;
|
||||
|
|
|
@ -37,6 +37,7 @@ void lp_primal_core_solver<T, X>::sort_non_basis() {
|
|||
unsigned ca = this->m_A.number_of_non_zeroes_in_column(a);
|
||||
unsigned cb = this->m_A.number_of_non_zeroes_in_column(b);
|
||||
if (ca == 0 && cb != 0) return false;
|
||||
if (ca != 0 && cb == 0) return true;
|
||||
return ca < cb;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue