mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
fixes in horner's heuristic
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
207c1c509f
commit
1b8b09cddb
6 changed files with 145 additions and 69 deletions
|
@ -57,8 +57,8 @@ class lar_solver : public column_namer {
|
|||
size_t seed = 0;
|
||||
int i = 0;
|
||||
for (const auto& p : t.coeffs()) {
|
||||
hash_combine(seed, p.m_key);
|
||||
hash_combine(seed, p.m_value);
|
||||
hash_combine(seed, p.first);
|
||||
hash_combine(seed, p.second);
|
||||
if (i++ > 10)
|
||||
break;
|
||||
}
|
||||
|
@ -106,7 +106,9 @@ public:
|
|||
vector<lar_term*> m_terms;
|
||||
indexed_vector<mpq> m_column_buffer;
|
||||
bool m_need_register_terms;
|
||||
std::unordered_map<lar_term, unsigned, term_hasher, term_comparer> m_normalized_terms_to_columns; // end of fields
|
||||
std::unordered_map<lar_term, std::pair<mpq, unsigned>, term_hasher, term_comparer>
|
||||
m_normalized_terms_to_columns;
|
||||
// end of fields
|
||||
|
||||
unsigned terms_start_index() const { return m_terms_start_index; }
|
||||
const vector<lar_term*> & terms() const { return m_terms; }
|
||||
|
@ -646,6 +648,6 @@ public:
|
|||
void register_existing_terms();
|
||||
void register_normalized_term(const lar_term&, lpvar);
|
||||
void deregister_normalized_term(const lar_term&);
|
||||
lpvar fetch_normalized_term_column(const lar_term& t) const;
|
||||
bool fetch_normalized_term_column(const lar_term& t, std::pair<mpq, lpvar>& ) const;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue