mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
rewrite horner scheme on top of nex_expr as a pointer
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
0f2c8c21ff
commit
9fbd0da931
7 changed files with 563 additions and 695 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "math/lp/nla_common.h"
|
||||
#include "math/lp/nla_intervals.h"
|
||||
#include "math/lp/nla_expr.h"
|
||||
#include "math/lp/cross_nested.h"
|
||||
|
||||
namespace nla {
|
||||
class core;
|
||||
|
@ -30,31 +31,30 @@ class core;
|
|||
class horner : common {
|
||||
intervals m_intervals;
|
||||
public:
|
||||
typedef nla_expr<rational> nex;
|
||||
typedef intervals::interval interv;
|
||||
horner(core *core);
|
||||
void horner_lemmas();
|
||||
template <typename T> // T has an iterator of (coeff(), var())
|
||||
bool lemmas_on_row(const T&);
|
||||
template <typename T> bool row_is_interesting(const T&) const;
|
||||
template <typename T> nex create_sum_from_row(const T&);
|
||||
intervals::interval interval_of_expr(const nex& e);
|
||||
template <typename T>
|
||||
nex_sum* create_sum_from_row(const T&, cross_nested&);
|
||||
intervals::interval interval_of_expr(const nex* e);
|
||||
|
||||
nex nexvar(lpvar j) const;
|
||||
intervals::interval interval_of_sum(const nex&);
|
||||
intervals::interval interval_of_sum_no_terms(const nex&);
|
||||
intervals::interval interval_of_mul(const nex&);
|
||||
nex* nexvar(lpvar j, cross_nested& cn) const;
|
||||
intervals::interval interval_of_sum(const nex_sum*);
|
||||
intervals::interval interval_of_sum_no_terms(const nex_sum*);
|
||||
intervals::interval interval_of_mul(const nex_mul*);
|
||||
void set_interval_for_scalar(intervals::interval&, const rational&);
|
||||
void set_var_interval(lpvar j, intervals::interval&) const;
|
||||
bool lemmas_on_expr(nex &);
|
||||
bool lemmas_on_expr(nex_sum* , cross_nested&);
|
||||
|
||||
template <typename T> // T has an iterator of (coeff(), var())
|
||||
bool row_has_monomial_to_refine(const T&) const;
|
||||
lpvar find_term_column(const nex& e, rational& a, rational& b) const;
|
||||
static lp::lar_term expression_to_normalized_term(nex&, rational& a, rational & b);
|
||||
static void add_linear_to_vector(const nex&, vector<std::pair<rational, lpvar>> &);
|
||||
static void add_mul_to_vector(const nex&, vector<std::pair<rational, lpvar>> &);
|
||||
bool is_tighter(const interv&, const interv&) const;
|
||||
bool interval_from_term(const nex& e, interv&) const;
|
||||
lpvar find_term_column(const nex* e, rational& a, rational& b) const;
|
||||
static lp::lar_term expression_to_normalized_term(const nex_sum*, rational& a, rational & b);
|
||||
static void add_linear_to_vector(const nex*, vector<std::pair<rational, lpvar>> &);
|
||||
static void add_mul_to_vector(const nex_mul*, vector<std::pair<rational, lpvar>> &);
|
||||
bool interval_from_term(const nex* e, interv&) const;
|
||||
}; // end of horner
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue