mirror of
https://github.com/Z3Prover/z3
synced 2026-02-07 09:42:14 +00:00
Refactor optimization and model to use C++17 structured bindings for pairs (#8426)
* Initial plan * Refactor pairs to use C++17 structured bindings in opt and model components Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
0b1d30e86f
commit
1ec30620ef
2 changed files with 5 additions and 3 deletions
|
|
@ -744,11 +744,12 @@ namespace opt {
|
|||
for (unsigned i = 0; i < m_objectives.size(); ++i) {
|
||||
objective const& obj = m_objectives[i];
|
||||
display_objective(out, obj);
|
||||
auto [lower, upper] = b[i];
|
||||
if (obj.m_type == O_MAXIMIZE) {
|
||||
out << " |-> [" << b[i].first << ":" << b[i].second << "]\n";
|
||||
out << " |-> [" << lower << ":" << upper << "]\n";
|
||||
}
|
||||
else {
|
||||
out << " |-> [" << -b[i].second << ":" << -b[i].first << "]\n";
|
||||
out << " |-> [" << -upper << ":" << -lower << "]\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue