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

emons branch

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-04-17 10:41:14 -07:00
parent 14f00b3749
commit b52e79b648
11 changed files with 955 additions and 236 deletions

View file

@ -35,10 +35,22 @@ namespace nla {
unsigned operator[](unsigned idx) const { return m_vs[idx]; }
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; }
const svector<lp::var_index>& vars() const { return m_vs; }
bool empty() const { return m_vs.empty(); }
std::ostream& display(std::ostream& out) const {
out << "v" << var() << " := ";
for (auto v : *this) {
out << "v" << v << " ";
}
return out;
}
};
inline std::ostream& operator<<(std::ostream& out, monomial const& m) {
return m.display(out);
}
typedef std::unordered_map<lp::var_index, rational> variable_map_type;
bool check_assignment(monomial const& m, variable_map_type & vars);