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 16:22:49 -10:00 committed by Lev Nachmanson
parent 00acf408bf
commit 98823ef8ac
3 changed files with 24 additions and 26 deletions

View file

@ -156,6 +156,20 @@ struct rooted_mon_table {
}
}
void register_key_mono_in_rooted_monomials(monomial_coeff const& mc, unsigned i_mon) {
index_with_sign ms(i_mon, mc.coeff());
auto it = map().find(mc.vars());
if (it == map().end()) {
TRACE("nla_solver", tout << "size = " << vec().size(););
rooted_mon_info rmi(vec().size(), ms);
map().emplace(mc.vars(), rmi);
vec().push_back(rooted_mon(mc.vars(), i_mon, mc.coeff()));
}
else {
it->second.push_back(ms);
TRACE("nla_solver", tout << "add ms.m_i = " << ms.m_i;);
}
}
};
}