3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

do not print external names in nla_solver

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-05-22 03:43:37 -07:00
parent 58c8f3f118
commit 3b9b4d973b
6 changed files with 60 additions and 6 deletions

View file

@ -98,7 +98,30 @@ void print_linear_combination_of_column_indices_only(const T & coeffs, std::ostr
else
out << T_to_string(val);
out << "x" << it.var();
out << "v" << it.var();
}
}
template <typename T>
void print_linear_combination_of_column_indices_only(const vector<std::pair<T, unsigned>> & coeffs, std::ostream & out) {
bool first = true;
for (const auto & it : coeffs) {
auto val = it.first;
if (first) {
first = false;
} else {
if (val.is_pos()) {
out << " + ";
} else {
out << " - ";
val = -val;
}
}
if (val == 1)
out << " ";
else
out << T_to_string(val);
out << "v" << it.second;
}
}