mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
change try_patch to a template
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
b84585beeb
commit
2de79be31b
2 changed files with 2 additions and 3 deletions
|
@ -307,7 +307,7 @@ public:
|
|||
inline unsigned row_count() const { return A_r().row_count(); }
|
||||
bool var_is_registered(var_index vj) const;
|
||||
template <typename Blocker, typename ChangeReport>
|
||||
bool try_to_patch(lpvar j, const mpq& val, const std::function<bool (lpvar)>& blocker,const std::function<void (lpvar)>& 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);
|
||||
|
|
|
@ -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<bool(lpvar)>,
|
||||
std::function<void(lpvar)>>(k, v, blocker, change_report);
|
||||
return m_lar_solver.try_to_patch(k, v, blocker, change_report);
|
||||
}
|
||||
|
||||
bool in_power(const svector<lpvar>& vs, unsigned l) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue