3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-29 22:40:08 +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 12:02:08 -10:00 committed by Lev Nachmanson
parent 64a7231079
commit 00acf408bf
2 changed files with 22 additions and 22 deletions

View file

@ -136,5 +136,26 @@ struct rooted_mon_table {
find_rooted_monomials_containing_rm(i);
}
}
void register_rooted_monomial_containing_vars(unsigned i_rm) {
for (lpvar j_var : vec()[i_rm].vars()) {
auto it = var_map().find(j_var);
if (it == var_map().end()) {
std::unordered_set<unsigned> s;
s.insert(i_rm);
var_map()[j_var] = s;
} else {
it->second.insert(i_rm);
}
}
}
void fill_rooted_monomials_containing_var() {
for (unsigned i = 0; i < vec().size(); i++) {
register_rooted_monomial_containing_vars(i);
}
}
};
}