From 2de79be31bdeca1f14274d433aa319cc21ff3435 Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Tue, 26 May 2020 16:19:57 -0700 Subject: [PATCH] change try_patch to a template Signed-off-by: Lev Nachmanson --- src/math/lp/lar_solver.h | 2 +- src/math/lp/nla_core.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/math/lp/lar_solver.h b/src/math/lp/lar_solver.h index 45198ca1f..3060f6544 100644 --- a/src/math/lp/lar_solver.h +++ b/src/math/lp/lar_solver.h @@ -307,7 +307,7 @@ public: inline unsigned row_count() const { return A_r().row_count(); } bool var_is_registered(var_index vj) const; template - bool try_to_patch(lpvar j, const mpq& val, const std::function& blocker,const std::function& change_report) { + bool try_to_patch(lpvar j, const mpq& val, const Blocker& blocker,const ChangeReport& change_report) { if (is_base(j)) { TRACE("nla_solver", get_int_solver()->display_row_info(tout, row_of_basic_column(j)) << "\n";); remove_from_basis(j); diff --git a/src/math/lp/nla_core.cpp b/src/math/lp/nla_core.cpp index 97d2d885d..a5280d47f 100644 --- a/src/math/lp/nla_core.cpp +++ b/src/math/lp/nla_core.cpp @@ -1308,8 +1308,7 @@ bool core::patch_blocker(lpvar u, const monic& m) const { bool core::try_to_patch(lpvar k, const rational& v, const monic & m) { auto blocker = [this, k, m](lpvar u) { return u != k && patch_blocker(u, m); }; auto change_report = [this](lpvar u) { update_to_refine_of_var(u); }; - return m_lar_solver.try_to_patch, - std::function>(k, v, blocker, change_report); + return m_lar_solver.try_to_patch(k, v, blocker, change_report); } bool in_power(const svector& vs, unsigned l) {