3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

integrating Nikolaj's changes

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2018-11-01 11:36:04 -07:00
parent 7a5666f1df
commit c1e0c79a69
3 changed files with 44 additions and 9 deletions

View file

@ -16,6 +16,7 @@ namespace nla {
// fields
lp::var_index m_v;
svector<lp::var_index> m_vs;
rational m_coeff;
public:
// constructors
monomial(lp::var_index v, unsigned sz, lp::var_index const* vs):
@ -30,6 +31,8 @@ namespace nla {
svector<lp::var_index>::const_iterator begin() const { return m_vs.begin(); }
svector<lp::var_index>::const_iterator end() const { return m_vs.end(); }
const svector<lp::var_index> vars() const { return m_vs; }
bool empty() const { return m_vs.empty(); }
const rational& get_coeff() const { return m_coeff; }
};
typedef std::unordered_map<lp::var_index, rational> variable_map_type;
@ -56,7 +59,7 @@ namespace nla {
monomial(v, vs),
m_coeff(coeff) {}
rational const& coeff() const { return m_coeff; }
rational const& coeff() const { return m_coeff; }
};
}

View file

@ -24,6 +24,8 @@ Revision History:
#include "util/params.h"
#include "nlsat/nlsat_solver.h"
#include "util/lp/lar_solver.h"
#include "util/lp/monomial.h"
namespace nla {
struct ineq {
lp::lconstraint_kind m_cmp;
@ -36,7 +38,7 @@ struct ineq {
};
typedef vector<ineq> lemma;
typedef vector<monomial> polynomial;
// nonlinear integer incremental linear solver
class solver {
struct imp;