mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
work on Gomory cut
Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
parent
5bbe0508e4
commit
ca3ce964ce
6 changed files with 160 additions and 47 deletions
|
@ -33,29 +33,6 @@ public:
|
|||
print_linear_combination_of_column_indices(coeff, out);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void print_linear_combination_of_column_indices_only(const vector<std::pair<T, unsigned>> & coeffs, std::ostream & out) const {
|
||||
bool first = true;
|
||||
for (const auto & it : coeffs) {
|
||||
auto val = it.first;
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
if (numeric_traits<T>::is_pos(val)) {
|
||||
out << " + ";
|
||||
} else {
|
||||
out << " - ";
|
||||
val = -val;
|
||||
}
|
||||
}
|
||||
if (val == -numeric_traits<T>::one())
|
||||
out << " - ";
|
||||
else if (val != numeric_traits<T>::one())
|
||||
out << T_to_string(val);
|
||||
|
||||
out << "v" << it.second;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue