mirror of
https://github.com/Z3Prover/z3
synced 2025-06-30 01:48:45 +00:00
formatting updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
db84d21e3b
commit
f07553ed3a
1 changed files with 9 additions and 11 deletions
|
@ -181,13 +181,12 @@ public:
|
||||||
|
|
||||||
void propagate_monic(lpvar monic_var, const svector<lpvar>& vars) {
|
void propagate_monic(lpvar monic_var, const svector<lpvar>& vars) {
|
||||||
lpvar non_fixed, zero_var;
|
lpvar non_fixed, zero_var;
|
||||||
if (!is_linear(vars, zero_var, non_fixed)) {
|
if (!is_linear(vars, zero_var, non_fixed))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (zero_var != null_lpvar) {
|
if (zero_var != null_lpvar)
|
||||||
add_bounds_for_zero_var(monic_var, zero_var);
|
add_bounds_for_zero_var(monic_var, zero_var);
|
||||||
} else {
|
else {
|
||||||
rational k = rational(1);
|
rational k = rational(1);
|
||||||
for (auto v : vars)
|
for (auto v : vars)
|
||||||
if (v != non_fixed) {
|
if (v != non_fixed) {
|
||||||
|
@ -195,19 +194,18 @@ public:
|
||||||
if (k.is_big()) return;
|
if (k.is_big()) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (non_fixed != null_lpvar) {
|
if (non_fixed != null_lpvar)
|
||||||
propagate_monic_with_non_fixed(monic_var, vars, non_fixed, k);
|
propagate_monic_with_non_fixed(monic_var, vars, non_fixed, k);
|
||||||
} else { // all variables are fixed
|
else // all variables are fixed
|
||||||
propagate_monic_with_all_fixed(monic_var, vars, k);
|
propagate_monic_with_all_fixed(monic_var, vars, k);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void propagate_monic_with_non_fixed(lpvar monic_var, const svector<lpvar>& vars, lpvar non_fixed, const rational& k) {
|
void propagate_monic_with_non_fixed(lpvar monic_var, const svector<lpvar>& vars, lpvar non_fixed, const rational& k) {
|
||||||
lp::impq bound_value;
|
lp::impq bound_value;
|
||||||
bool is_strict;
|
bool is_strict;
|
||||||
|
|
||||||
if (lower_bound_is_available(non_fixed)) {
|
if (lower_bound_is_available(non_fixed)) {
|
||||||
bound_value = lp().column_lower_bound(non_fixed);
|
bound_value = lp().column_lower_bound(non_fixed);
|
||||||
is_strict = !bound_value.y.is_zero();
|
is_strict = !bound_value.y.is_zero();
|
||||||
auto lambda = [vars, non_fixed](int* s) {
|
auto lambda = [vars, non_fixed](int* s) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue