Skip to content

Commit

Permalink
before rm lu
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
  • Loading branch information
levnach committed Mar 8, 2023
1 parent f7c9c9e commit ea16f66
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 3,879 deletions.
3 changes: 0 additions & 3 deletions src/math/lp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ z3_add_component(lp
lar_core_solver.cpp
lp_core_solver_base.cpp
lp_dual_core_solver.cpp
lp_dual_simplex.cpp
lp_primal_core_solver.cpp
lp_primal_simplex.cpp
lp_settings.cpp
lp_solver.cpp
lu.cpp
lp_utils.cpp
matrix.cpp
Expand Down
11 changes: 0 additions & 11 deletions src/math/lp/indexed_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,4 @@ class indexed_value {
m_value = val;
}
};
#ifdef Z3DEBUG
template <typename X>
bool check_vector_for_small_values(indexed_vector<X> & w, lp_settings & settings) {
for (unsigned i : w.m_index) {
const X & v = w[i];
if ((!is_zero(v)) && settings.abs_val_is_smaller_than_drop_tolerance(v))
return false;
}
return true;
}
#endif
}
30 changes: 1 addition & 29 deletions src/math/lp/lar_core_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,35 +651,7 @@ class lar_core_solver {
}
}

void scale_problem_for_doubles(
static_matrix<double, double>& A,
vector<double> & lower_bounds,
vector<double> & upper_bounds) {
vector<double> column_scale_vector;
vector<double> right_side_vector(A.column_count());
settings().reps_in_scaler = 5;
scaler<double, double > scaler(right_side_vector,
A,
settings().scaling_minimum,
settings().scaling_maximum,
column_scale_vector,
settings());
if (! scaler.scale()) {
// the scale did not succeed, unscaling
A.clear();
create_double_matrix(A);
} else {
for (unsigned j = 0; j < A.column_count(); j++) {
if (m_r_solver.column_has_upper_bound(j)) {
upper_bounds[j] /= column_scale_vector[j];
}
if (m_r_solver.column_has_lower_bound(j)) {
lower_bounds[j] /= column_scale_vector[j];
}
}
}

}

// returns the trace of basis changes
vector<unsigned> find_solution_signature_with_doubles(lar_solution_signature & signature) {
if (m_d_solver.m_factorization == nullptr || m_d_solver.m_factorization->get_status() != LU_status::OK) {
Expand Down
24 changes: 0 additions & 24 deletions src/math/lp/lp_dual_simplex.cpp

This file was deleted.

93 changes: 0 additions & 93 deletions src/math/lp/lp_dual_simplex.h

This file was deleted.

Loading

0 comments on commit ea16f66

Please sign in to comment.