3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-17 08:42:15 +00:00

add var_factors

Add routine to partially factor polynomials. It factors out variables.
This commit is contained in:
Nikolaj Bjorner 2022-07-14 11:06:43 -07:00
parent 981c82c814
commit 4a192850f2
3 changed files with 134 additions and 0 deletions

View file

@ -364,6 +364,11 @@ namespace dd {
bool different_leading_term(pdd const& other) const { return m.different_leading_term(*this, other); }
void factor(unsigned v, unsigned degree, pdd& lc, pdd& rest) { m.factor(*this, v, degree, lc, rest); }
/**
* \brief factor out variables
*/
std::pair<unsigned_vector, pdd> var_factors();
pdd subst_val(vector<std::pair<unsigned, rational>> const& s) const { return m.subst_val(*this, s); }
pdd subst_val(unsigned v, rational const& val) const { return m.subst_val(*this, v, val); }