3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

cleanup nla_solver

Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
Lev 2018-10-08 13:09:38 -07:00 committed by Lev Nachmanson
parent 8d02c1ee5d
commit ccd978e43b
2 changed files with 61 additions and 37 deletions

View file

@ -0,0 +1,40 @@
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner)
Lev Nachmanson (levnach)
Revision History:
--*/
namespace nla {
class factorization {
svector<lpvar> m_vars;
rational m_sign;
std::function<void (expl_set&)> m_explain;
public:
void explain(expl_set& s) const { m_explain(s); }
bool is_empty() const { return m_vars.empty(); }
svector<lpvar> & vars() { return m_vars; }
const svector<lpvar> & vars() const { return m_vars; }
rational const& sign() const { return m_sign; }
rational& sign() { return m_sign; } // the setter
unsigned operator[](unsigned k) const { return m_vars[k]; }
size_t size() const { return m_vars.size(); }
const lpvar* begin() const { return m_vars.begin(); }
const lpvar* end() const { return m_vars.end(); }
factorization(std::function<void (expl_set&)> explain) : m_explain(explain) {}
};
}