From 8549dc2b19e50f0fa043477dbc6bc834e8f900bf Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Wed, 19 Feb 2025 13:31:07 +0100 Subject: [PATCH] [GLOP] remove dead code --- ortools/glop/lu_factorization.cc | 14 -------------- ortools/glop/preprocessor.cc | 5 ----- ortools/glop/primal_edge_norms.h | 1 - ortools/glop/update_row.h | 1 - 4 files changed, 21 deletions(-) diff --git a/ortools/glop/lu_factorization.cc b/ortools/glop/lu_factorization.cc index e34fa6c5d5..89d1706077 100644 --- a/ortools/glop/lu_factorization.cc +++ b/ortools/glop/lu_factorization.cc @@ -565,20 +565,6 @@ Fractional LuFactorization::ComputeInverseInfinityNormUpperBound() const { upper_.ComputeInverseInfinityNormUpperBound(); } -namespace { -// Returns the density of the sparse column 'b' w.r.t. the given permutation. -double ComputeDensity(const SparseColumn& b, const RowPermutation& row_perm) { - double density = 0.0; - for (const SparseColumn::Entry e : b) { - if (row_perm[e.row()] != kNonPivotal && e.coefficient() != 0.0) { - ++density; - } - } - const RowIndex num_rows = row_perm.size(); - return density / num_rows.value(); -} -} // anonymous namespace - void LuFactorization::ComputeTransposeUpper() { SCOPED_TIME_STAT(&stats_); transpose_upper_.PopulateFromTranspose(upper_); diff --git a/ortools/glop/preprocessor.cc b/ortools/glop/preprocessor.cc index e70f0eb5f6..41e00bbcfa 100644 --- a/ortools/glop/preprocessor.cc +++ b/ortools/glop/preprocessor.cc @@ -44,11 +44,6 @@ namespace glop { using ::util::Reverse; namespace { -// Returns an interval as an human readable string for debugging. -std::string IntervalString(Fractional lb, Fractional ub) { - return absl::StrFormat("[%g, %g]", lb, ub); -} - #if defined(_MSC_VER) double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } #endif diff --git a/ortools/glop/primal_edge_norms.h b/ortools/glop/primal_edge_norms.h index 4f5c6ecf9b..cfcc5c9e66 100644 --- a/ortools/glop/primal_edge_norms.h +++ b/ortools/glop/primal_edge_norms.h @@ -203,7 +203,6 @@ class PrimalEdgeNorms { Stats stats_; // Booleans to control what happens on the next ChooseEnteringColumn() call. - bool must_refactorize_basis_; bool recompute_edge_squared_norms_; bool reset_devex_weights_; diff --git a/ortools/glop/update_row.h b/ortools/glop/update_row.h index a8ef34844a..8f9822a1d8 100644 --- a/ortools/glop/update_row.h +++ b/ortools/glop/update_row.h @@ -145,7 +145,6 @@ class UpdateRow { DenseRow coefficient_; // Boolean used to avoid recomputing many times the same thing. - bool compute_update_row_; RowIndex left_inverse_computed_for_ = kInvalidRow; RowIndex update_row_computed_for_ = kInvalidRow;