/*++ Copyright (c) 2017 Microsoft Corporation Module Name: Abstract: Author: Lev Nachmanson (levnach) Revision History: --*/ #pragma once #include #include "util/vector.h" #include #include #include #include "math/lp/lp_settings.h" // see http://research.microsoft.com/projects/z3/smt07.pdf // The class searches for a feasible solution with as many different values of variables as it can find namespace lp { template struct numeric_pair; // forward definition class lar_solver; // forward definition class random_updater { std::set m_var_set; lar_solver & m_lar_solver; unsigned m_range; void add_column_to_sets(unsigned j); bool random_shift_var(unsigned j); std::unordered_map, unsigned> m_values; // it maps a value to the number of time it occurs bool shift_var(unsigned j); void add_value(const numeric_pair& v); void remove_value(const numeric_pair & v); public: random_updater(lar_solver & solver, const vector & column_list); void update(); }; }