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

move some functionality from nla_solver to rooted_mons

Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
Lev 2018-12-06 11:55:53 -10:00 committed by Lev Nachmanson
parent b43a0e184c
commit 64a7231079
3 changed files with 69 additions and 55 deletions

View file

@ -22,6 +22,7 @@ Revision History:
#include "util/lp/numeric_pair.h"
#include "util/debug.h"
#include <unordered_map>
#include <unordered_set>
template <typename C>
void print_vector(const C & t, std::ostream & out) {
for (const auto & p : t)
@ -212,6 +213,19 @@ struct hash<lp::numeric_pair<lp::mpq>> {
return seed;
}
};
inline
void intersect_set(std::unordered_set<unsigned>& p, const std::unordered_set<unsigned>& w) {
for (auto it = p.begin(); it != p.end(); ) {
auto iit = it;
iit ++;
if (w.find(*it) == w.end())
p.erase(it);
it = iit;
}
}
}