3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-05 13:10:23 +00:00

change core::get_var_weight() to return unsigned, remove some warnings from test/lp/lp.cpp

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-12-28 13:19:20 -08:00
parent 1cc5935953
commit 0bb29bca69
4 changed files with 108 additions and 118 deletions

View file

@ -1593,28 +1593,30 @@ void core::set_active_vars_weights(nex_creator& nc) {
}
}
var_weight core::get_var_weight(lpvar j) const {
var_weight k;
unsigned core::get_var_weight(lpvar j) const {
unsigned k;
switch (m_lar_solver.get_column_type(j)) {
case lp::column_type::fixed:
k = var_weight::FIXED;
k = 0;
break;
case lp::column_type::boxed:
k = var_weight::BOUNDED;
k = 2;
break;
case lp::column_type::lower_bound:
case lp::column_type::upper_bound:
k = var_weight::NOT_FREE;
k = 4;
case lp::column_type::free_column:
k = var_weight::FREE;
k = 6;
break;
default:
UNREACHABLE();
break;
}
if (is_monic_var(j)) {
return (var_weight)((int)k + 1);
k++;
if (m_to_refine.contains(j))
k++;
}
return k;
}