3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-11 21:50:52 +00:00

Partial cleanup of util/lp/*

This commit is contained in:
Christoph M. Wintersteiger 2017-09-17 16:00:06 +01:00
parent 00651f8f21
commit d61b722b68
109 changed files with 3503 additions and 2023 deletions

View file

@ -1,7 +1,22 @@
/*
Copyright (c) 2017 Microsoft Corporation
Author: Lev Nachmanson
*/
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
<name>
Abstract:
<abstract>
Author:
Lev Nachmanson (levnach)
Revision History:
--*/
#pragma once
#include "util/vector.h"
#include "util/lp/linear_combination_iterator.h"
@ -13,7 +28,7 @@
// We try to pin a var by pushing the total by using the variable bounds
// In a loop we drive the partial sum down, denoting the variables of this process by _u.
// In the same loop trying to pin variables by pushing the partial sum up, denoting the variable related to it by _l
namespace lean {
namespace lp {
class bound_analyzer_on_row {
@ -91,11 +106,11 @@ public :
}
const impq & ub(unsigned j) const {
lean_assert(upper_bound_is_available(j));
SASSERT(upper_bound_is_available(j));
return m_bp.get_upper_bound(j);
}
const impq & lb(unsigned j) const {
lean_assert(low_bound_is_available(j));
SASSERT(low_bound_is_available(j));
return m_bp.get_low_bound(j);
}
@ -153,7 +168,7 @@ public :
void limit_all_monoids_from_above() {
int strict = 0;
mpq total;
lean_assert(is_zero(total));
SASSERT(is_zero(total));
m_it.reset();
mpq a; unsigned j;
while (m_it.next(a, j)) {
@ -180,7 +195,7 @@ public :
void limit_all_monoids_from_below() {
int strict = 0;
mpq total;
lean_assert(is_zero(total));
SASSERT(is_zero(total));
m_it.reset();
mpq a; unsigned j;
while (m_it.next(a, j)) {
@ -272,7 +287,7 @@ public :
// mpq a; unsigned j;
// while (it->next(a, j)) {
// if (be.m_j == j) continue;
// lean_assert(bound_is_available(j, is_neg(a) ? low_bound : !low_bound));
// SASSERT(bound_is_available(j, is_neg(a) ? low_bound : !low_bound));
// be.m_vector_of_bound_signatures.emplace_back(a, j, numeric_traits<impq>::
// is_neg(a)? low_bound: !low_bound);
// }