3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Merge branch 'master' into sls

This commit is contained in:
Nikolaj Bjorner 2024-10-11 09:56:46 -07:00
commit 5d9d134151
406 changed files with 17512 additions and 8359 deletions

View file

@ -571,8 +571,7 @@ namespace dd {
pdd_monomial const* operator->() const { return &m_mono; }
pdd_iterator& operator++() { next(); return *this; }
pdd_iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(pdd_iterator const& other) const { return m_nodes == other.m_nodes; }
bool operator!=(pdd_iterator const& other) const { return !operator==(other); }
bool operator!=(pdd_iterator const& other) const { return m_nodes != other.m_nodes; }
};
class pdd_linear_iterator {
@ -591,7 +590,6 @@ namespace dd {
pointer operator->() const { return &m_mono; }
pdd_linear_iterator& operator++() { next(); return *this; }
pdd_linear_iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(pdd_linear_iterator const& other) const { return m_next == other.m_next; }
bool operator!=(pdd_linear_iterator const& other) const { return m_next != other.m_next; }
};

View file

@ -48,7 +48,7 @@ public:
friend class grobner;
friend struct monomial_lt;
monomial() {}
monomial() = default;
public:
rational const & get_coeff() const { return m_coeff; }
unsigned get_degree() const { return m_vars.size(); }
@ -63,7 +63,7 @@ public:
ptr_vector<monomial> m_monomials; //!< sorted monomials
v_dependency * m_dep; //!< justification for the equality
friend class grobner;
equation() {}
equation() = default;
public:
unsigned get_num_monomials() const { return m_monomials.size(); }
monomial const * get_monomial(unsigned idx) const { return m_monomials[idx]; }

View file

@ -369,7 +369,6 @@ public:
}
iterator& operator++() { fwd(); return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const& it) const {return m_count == it.m_count; }
bool operator!=(iterator const& it) const {return m_count != it.m_count; }
private:

View file

@ -455,7 +455,6 @@ public:
offset_t operator*() const { return p.m_passive[m_idx]; }
iterator& operator++() { ++m_idx; fwd(); return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const& it) const {return m_idx == it.m_idx; }
bool operator!=(iterator const& it) const {return m_idx != it.m_idx; }
};
@ -614,7 +613,6 @@ public:
offset_t sos() const { return (p.hb.vec(pas()).weight().is_pos()?p.m_neg_sos:p.m_pos_sos)[p.m_psos[m_idx]]; }
iterator& operator++() { ++m_idx; fwd(); return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const& it) const {return m_idx == it.m_idx; }
bool operator!=(iterator const& it) const {return m_idx != it.m_idx; }
};

View file

@ -115,7 +115,6 @@ class hilbert_basis {
offset_t operator*() const { return hb.m_basis[m_idx]; }
iterator& operator++() { ++m_idx; return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const& it) const {return m_idx == it.m_idx; }
bool operator!=(iterator const& it) const {return m_idx != it.m_idx; }
};

View file

@ -26,7 +26,7 @@ namespace bv {
bool tight = true;
interval_tpl(T const& l, T const& h, unsigned sz, bool tight = false): l(l), h(h), sz(sz), tight(tight) {}
interval_tpl() {}
interval_tpl() = default;
bool invariant() const {
return
@ -167,7 +167,7 @@ namespace bv {
iinterval i;
rinterval r;
interval() {}
interval() = default;
interval(rational const& l, rational const& h, unsigned sz, bool tight = false) {
if (sz <= 64) {

View file

@ -21,7 +21,5 @@ Revision History:
#include "math/lp/core_solver_pretty_printer_def.h"
template lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::core_solver_pretty_printer(const lp::lp_core_solver_base<lp::mpq, lp::mpq> &, std::ostream & out);
template void lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::print();
template lp::core_solver_pretty_printer<lp::mpq, lp::mpq>::~core_solver_pretty_printer();
template lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::core_solver_pretty_printer(const lp::lp_core_solver_base<lp::mpq, lp::numeric_pair<lp::mpq> > &, std::ostream & out);
template lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::~core_solver_pretty_printer();
template void lp::core_solver_pretty_printer<lp::mpq, lp::numeric_pair<lp::mpq> >::print();

View file

@ -66,7 +66,6 @@ public:
void init_costs();
~core_solver_pretty_printer();
void init_rs_width();
T current_column_norm();

View file

@ -67,8 +67,6 @@ template <typename T, typename X> void core_solver_pretty_printer<T, X>::init_co
}
template <typename T, typename X> core_solver_pretty_printer<T, X>::~core_solver_pretty_printer() {
}
template <typename T, typename X> void core_solver_pretty_printer<T, X>::init_rs_width() {
m_rs_width = static_cast<unsigned>(T_to_string(m_core_solver.get_cost()).size());
for (unsigned i = 0; i < nrows(); i++) {

View file

@ -51,9 +51,8 @@ class emonics {
unsigned m_index;
};
struct head_tail {
head_tail(): m_head(nullptr), m_tail(nullptr) {}
cell* m_head;
cell* m_tail;
cell* m_head = nullptr;
cell* m_tail = nullptr;
};
struct hash_canonical {
emonics& em;
@ -205,7 +204,6 @@ public:
monic & operator*() { return m.m_monics[m_cell->m_index]; }
iterator& operator++() { m_touched = true; m_cell = m_cell->m_next; return *this; }
iterator operator++(int) { iterator tmp = *this; ++*this; return tmp; }
bool operator==(iterator const& other) const { return m_cell == other.m_cell && m_touched == other.m_touched; }
bool operator!=(iterator const& other) const { return m_cell != other.m_cell || m_touched != other.m_touched; }
};
@ -239,7 +237,6 @@ public:
}
pf_iterator& operator++() { ++m_it; fast_forward(); return *this; }
pf_iterator operator++(int) { pf_iterator tmp = *this; ++*this; return tmp; }
bool operator==(pf_iterator const& other) const { return m_it == other.m_it; }
bool operator!=(pf_iterator const& other) const { return m_it != other.m_it; }
};

View file

@ -29,7 +29,7 @@ class explanation {
vector<std::pair<constraint_index, mpq>> m_vector;
ci_set m_set;
public:
explanation() {}
explanation() = default;
template <typename T>
explanation(const T& t) {
@ -106,11 +106,10 @@ public:
iterator(bool run_on_vector, pair_vec::const_iterator vi, ci_set::iterator cii) :
m_run_on_vector(run_on_vector), m_vi(vi), m_ci(cii)
{}
bool operator==(const iterator &other) const {
bool operator!=(const iterator &other) const {
SASSERT(m_run_on_vector == other.m_run_on_vector);
return m_run_on_vector? m_vi == other.m_vi : m_ci == other.m_ci;
return m_run_on_vector ? m_vi != other.m_vi : m_ci != other.m_ci;
}
bool operator!=(const iterator &other) const { return !(*this == other); }
};
iterator begin() const {

View file

@ -97,14 +97,12 @@ const_iterator_mon::const_iterator_mon(const bool_vector& mask, const factorizat
m_ff(f) ,
m_full_factorization_returned(false)
{}
bool const_iterator_mon::operator==(const const_iterator_mon::self_type &other) const {
return
m_full_factorization_returned == other.m_full_factorization_returned &&
m_mask == other.m_mask;
}
bool const_iterator_mon::operator!=(const const_iterator_mon::self_type &other) const { return !(*this == other); }
bool const_iterator_mon::operator!=(const const_iterator_mon::self_type &other) const {
return
m_full_factorization_returned != other.m_full_factorization_returned ||
m_mask != other.m_mask;
}
factorization const_iterator_mon::create_binary_factorization(factor j, factor k) const {
factorization f(nullptr);

View file

@ -24,7 +24,7 @@ class factor {
factor_type m_type = factor_type::VAR;
bool m_sign = false;
public:
factor() { }
factor() = default;
explicit factor(lpvar v, factor_type t) : m_var(v), m_type(t) {}
unsigned var() const { return m_var; }
factor_type type() const { return m_type; }
@ -88,8 +88,7 @@ struct const_iterator_mon {
self_type operator++(int);
const_iterator_mon(const bool_vector& mask, const factorization_factory *f);
bool operator==(const self_type &other) const;
bool operator!=(const self_type &other) const;
factorization create_binary_factorization(factor j, factor k) const;

View file

@ -180,7 +180,7 @@ public:
m_column_permutation.transpose_from_left(j, k);
}
general_matrix(){}
general_matrix() = default;
general_matrix(unsigned n) :
m_row_permutation(n),
m_column_permutation(n),

View file

@ -527,7 +527,7 @@ public:
has_small_cut = true;
add_cut(cc.m_t, cc.m_k, cc.m_dep);
if (lia.settings().get_cancel_flag())
return lia_move::undef;
return lia_move::cancelled;
}
if (big_cuts.size()) {
@ -544,6 +544,9 @@ public:
if (!_check_feasible())
return lia_move::conflict;
if (lra.get_status() == lp_status::CANCELLED)
return lia_move::cancelled;
if (!lia.has_inf_int())
return lia_move::sat;

View file

@ -19,8 +19,7 @@ namespace lp {
lia(lia),
lra(lia.lra),
m_settings(lia.settings()),
m_abs_max(zero_of_type<mpq>()),
m_var_register() {}
m_abs_max(zero_of_type<mpq>()) {}
bool hnf_cutter::is_full() const {
return

View file

@ -44,7 +44,7 @@ class implied_bound {
k = static_cast<lconstraint_kind>(k / 2);
return k;
}
implied_bound(){}
implied_bound() = default;
implied_bound(const mpq & a,
unsigned j,
bool is_lower_bound,

View file

@ -29,7 +29,7 @@ public:
// m_other is the offset of the corresponding element in its vector : for a row element it points to the column element offset,
// for a column element it points to the row element offset
unsigned m_other;
indexed_value() {}
indexed_value() = default;
indexed_value(T v, unsigned i, unsigned other) :
m_value(v), m_index(i), m_other(other) {

View file

@ -76,7 +76,7 @@ public:
}
indexed_vector() {}
indexed_vector() = default;
void resize(unsigned data_size);
unsigned data_size() const {

View file

@ -203,7 +203,6 @@ public:
lar_base_constraint const* operator->() const { return &cs[m_index]; }
iterator& operator++() { next(); return *this; }
iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(iterator const& other) const { return m_index == other.m_index; }
bool operator!=(iterator const& other) const { return m_index != other.m_index; }
};
iterator begin() const { return iterator(cs, 0); }
@ -229,7 +228,6 @@ public:
constraint_index const* operator->() const { return &m_index; }
iterator& operator++() { next(); return *this; }
iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(iterator const& other) const { return m_index == other.m_index; }
bool operator!=(iterator const& other) const { return m_index != other.m_index; }
};
iterator begin() const { return iterator(cs, 0); }

View file

@ -1930,9 +1930,10 @@ namespace lp {
default:
UNREACHABLE();
}
if (m_mpq_lar_core_solver.m_r_upper_bounds[j] == m_mpq_lar_core_solver.m_r_lower_bounds[j]) {
numeric_pair<mpq> const& lo = m_mpq_lar_core_solver.m_r_lower_bounds[j];
numeric_pair<mpq> const& hi = m_mpq_lar_core_solver.m_r_upper_bounds[j];
if (lo == hi)
m_mpq_lar_core_solver.m_column_types[j] = column_type::fixed;
}
}
void lar_solver::update_bound_with_no_ub_lb(lpvar j, lconstraint_kind kind, const mpq& right_side, u_dependency* dep) {
@ -2081,6 +2082,24 @@ namespace lp {
lpvar lar_solver::to_column(unsigned ext_j) const {
return m_var_register.external_to_local(ext_j);
}
bool lar_solver::move_lpvar_to_value(lpvar j, mpq const& value) {
if (is_base(j))
return false;
impq ivalue(value);
auto& lcs = m_mpq_lar_core_solver;
auto& slv = m_mpq_lar_core_solver.m_r_solver;
if (slv.column_has_upper_bound(j) && lcs.m_r_upper_bounds()[j] < ivalue)
return false;
if (slv.column_has_lower_bound(j) && lcs.m_r_lower_bounds()[j] > ivalue)
return false;
set_value_for_nbasic_column(j, ivalue);
return true;
}
bool lar_solver::tighten_term_bounds_by_delta(lpvar j, const impq& delta) {
SASSERT(column_has_term(j));

View file

@ -623,6 +623,7 @@ public:
lp_status find_feasible_solution();
void move_non_basic_columns_to_bounds();
bool move_non_basic_column_to_bounds(unsigned j);
bool move_lpvar_to_value(lpvar j, mpq const& value);
inline bool r_basis_has_inf_int() const {
for (unsigned j : r_basis()) {
if (column_is_int(j) && !column_value_is_int(j))

View file

@ -70,7 +70,7 @@ public:
}
}
// constructors
lar_term() {}
lar_term() = default;
lar_term(const vector<std::pair<mpq, unsigned>>& coeffs) {
for (auto const& p : coeffs) {
add_monomial(p.first, p.second);
@ -170,8 +170,7 @@ public:
const_iterator operator++() { const_iterator i = *this; m_it++; return i; }
const_iterator operator++(int) { m_it++; return *this; }
const_iterator(u_map<mpq>::iterator it) : m_it(it) {}
bool operator==(const const_iterator &other) const { return m_it == other.m_it; }
bool operator!=(const const_iterator &other) const { return !(*this == other); }
bool operator!=(const const_iterator &other) const { return m_it != other.m_it; }
};
bool is_normalized() const {

View file

@ -26,7 +26,8 @@ namespace lp {
conflict,
continue_with_check,
undef,
unsat
unsat,
cancelled
};
inline std::string lia_move_to_string(lia_move m) {
switch (m) {

View file

@ -97,42 +97,41 @@ public:
};
struct statistics {
unsigned m_make_feasible;
unsigned m_total_iterations;
unsigned m_iters_with_no_cost_growing;
unsigned m_num_factorizations;
unsigned m_num_of_implied_bounds;
unsigned m_need_to_solve_inf;
unsigned m_max_cols;
unsigned m_max_rows;
unsigned m_gcd_calls;
unsigned m_gcd_conflicts;
unsigned m_cube_calls;
unsigned m_cube_success;
unsigned m_patches;
unsigned m_patches_success;
unsigned m_hnf_cutter_calls;
unsigned m_hnf_cuts;
unsigned m_nla_calls;
unsigned m_gomory_cuts;
unsigned m_nla_add_bounds;
unsigned m_nla_propagate_bounds;
unsigned m_nla_propagate_eq;
unsigned m_nla_lemmas;
unsigned m_nra_calls;
unsigned m_nla_bounds_improvements;
unsigned m_horner_calls;
unsigned m_horner_conflicts;
unsigned m_cross_nested_forms;
unsigned m_grobner_calls;
unsigned m_grobner_conflicts;
unsigned m_offset_eqs;
unsigned m_fixed_eqs;
::statistics m_st;
statistics() { reset(); }
unsigned m_make_feasible = 0;
unsigned m_total_iterations = 0;
unsigned m_iters_with_no_cost_growing = 0;
unsigned m_num_factorizations = 0;
unsigned m_num_of_implied_bounds = 0;
unsigned m_need_to_solve_inf = 0;
unsigned m_max_cols = 0;
unsigned m_max_rows = 0;
unsigned m_gcd_calls = 0;
unsigned m_gcd_conflicts = 0;
unsigned m_cube_calls = 0;
unsigned m_cube_success = 0;
unsigned m_patches = 0;
unsigned m_patches_success = 0;
unsigned m_hnf_cutter_calls = 0;
unsigned m_hnf_cuts = 0;
unsigned m_nla_calls = 0;
unsigned m_gomory_cuts = 0;
unsigned m_nla_add_bounds = 0;
unsigned m_nla_propagate_bounds = 0;
unsigned m_nla_propagate_eq = 0;
unsigned m_nla_lemmas = 0;
unsigned m_nra_calls = 0;
unsigned m_nla_bounds_improvements = 0;
unsigned m_horner_calls = 0;
unsigned m_horner_conflicts = 0;
unsigned m_cross_nested_forms = 0;
unsigned m_grobner_calls = 0;
unsigned m_grobner_conflicts = 0;
unsigned m_offset_eqs = 0;
unsigned m_fixed_eqs = 0;
::statistics m_st = {};
void reset() {
memset(this, 0, sizeof(*this));
m_st.reset();
*this = statistics{};
}
void collect_statistics(::statistics& st) const {
st.update("arith-factorizations", m_num_factorizations);

View file

@ -92,7 +92,7 @@ public:
virtual const rational& coeff() const { return rational::one(); }
#ifdef Z3DEBUG
virtual void sort() {};
virtual void sort() {}
#endif
bool virtual is_linear() const = 0;
};

View file

@ -1678,7 +1678,7 @@ bool core::is_nl_var(lpvar j) const {
unsigned core::get_var_weight(lpvar j) const {
unsigned k;
unsigned k = 0;
switch (lra.get_column_type(j)) {
case lp::column_type::fixed:

View file

@ -19,7 +19,6 @@ Description:
namespace nla {
void divisions::add_idivision(lpvar q, lpvar x, lpvar y) {
const auto& lra = m_core.lra;
if (x == null_lpvar || y == null_lpvar || q == null_lpvar)
return;
m_idivisions.push_back({q, x, y});
@ -27,7 +26,6 @@ namespace nla {
}
void divisions::add_rdivision(lpvar q, lpvar x, lpvar y) {
auto& lra = m_core.lra;
if (x == null_lpvar || y == null_lpvar || q == null_lpvar)
return;
m_rdivisions.push_back({ q, x, y });

View file

@ -17,7 +17,7 @@ struct point {
rational x;
rational y;
point(const rational& a, const rational& b): x(a), y(b) {}
point() {}
point() = default;
inline point& operator*=(rational a) {
x *= a;
y *= a;

View file

@ -116,10 +116,7 @@ template <typename T>
struct numeric_pair {
T x;
T y;
// empty constructor
numeric_pair() {}
// another constructor
numeric_pair() = default;
numeric_pair(T xp, T yp) : x(xp), y(yp) {}
template <typename X>

View file

@ -52,7 +52,7 @@ class permutation_matrix
};
public:
permutation_matrix() {}
permutation_matrix() = default;
permutation_matrix(unsigned length);
permutation_matrix(unsigned length, vector<unsigned> const & values);

View file

@ -51,13 +51,21 @@ public:
operator const B&() const {
return m_vec.m_vector[m_i];
}
bool operator==(B const& other) const {
return m_vec.m_vector[m_i] == other;
}
bool operator!=(B const& other) const {
return m_vec.m_vector[m_i] != other;
}
bool operator==(ref const& other) const {
return m_vec.m_vector[m_i] == other.m_vec.m_vector[other.m_i];
}
bool operator!=(ref const& other) const {
return m_vec.m_vector[m_i] != other.m_vec.m_vector[other.m_i];
}
B& operator+=(B const &delta) {
// not tracking the change here!
return m_vec.m_vector[m_i] += delta;
@ -74,12 +82,16 @@ public:
public:
ref_const(const stacked_vector<B> &m, unsigned key) :m_vec(m), m_i(key) {
lp_assert(key < m.size());
}
}
operator const B&() const {
return m_vec.m_vector[m_i];
}
bool operator==(ref_const const& other) const {
return m_vec.m_vector[m_i] == other.m_vec.m_vector[other.m_i];
}
bool operator!=(ref_const const& other) const {
return m_vec.m_vector[m_i] != other.m_vec.m_vector[other.m_i];
}
};
private:
@ -98,9 +110,6 @@ private:
}
}
public:
stacked_vector() { }
ref operator[] (unsigned a) {
return ref(*this, a);
}

View file

@ -79,7 +79,7 @@ public:
ref(static_matrix & m, unsigned row, unsigned col):m_matrix(m), m_row(row), m_col(col) {}
ref & operator=(T const & v) { m_matrix.set( m_row, m_col, v); return *this; }
ref operator=(ref & v) { m_matrix.set(m_row, m_col, v.m_matrix.get(v.m_row, v.m_col)); return *this; }
ref operator=(ref & v) { m_matrix.set(m_row, m_col, v.m_matrix.get_elem(v.m_row, v.m_col)); return *this; }
operator T () const { return m_matrix.get_elem(m_row, m_col); }
};
@ -105,7 +105,7 @@ public:
void init_row_columns(unsigned m, unsigned n);
// constructor with no parameters
static_matrix() {}
static_matrix() = default;
// constructor
static_matrix(unsigned m, unsigned n): m_vector_of_row_offsets(n, -1) {

View file

@ -92,7 +92,7 @@ static_matrix<T, X>::static_matrix(static_matrix const &A, unsigned * /* basis *
init_row_columns(m, m);
for (; m-- > 0; )
for (auto & col : A.m_columns[m])
set(col.var(), m, A.get_value_of_column_cell(col));
set(col.var(), m, A.get_column_cell(col));
}
template <typename T, typename X> void static_matrix<T, X>::clear() {

View file

@ -81,7 +81,7 @@ class var_eqs {
mutable stats m_stats;
public:
var_eqs(): m_merge_handler(nullptr), m_uf(*this), m_stack() {}
var_eqs(): m_merge_handler(nullptr), m_uf(*this) {}
/**
\brief push a scope */
void push() {
@ -302,7 +302,6 @@ public:
return signed_var(m_idx);
}
iterator& operator++() { m_idx = m_ve.m_uf.next(m_idx); m_touched = true; return *this; }
bool operator==(iterator const& other) const { return m_idx == other.m_idx && m_touched == other.m_touched; }
bool operator!=(iterator const& other) const { return m_idx != other.m_idx || m_touched != other.m_touched; }
};

View file

@ -27,7 +27,7 @@ class ext_var_info {
bool m_is_integer;
std::string m_name;
public:
ext_var_info() {}
ext_var_info() = default;
ext_var_info(unsigned j): ext_var_info(j, true) {}
ext_var_info(unsigned j , bool is_int) : m_external_j(j), m_is_integer(is_int) {}
ext_var_info(unsigned j , bool is_int, std::string name) : m_external_j(j), m_is_integer(is_int), m_name(name) {}

View file

@ -121,9 +121,6 @@ namespace algebraic_numbers {
m_y = pm().mk_var();
}
~imp() {
}
bool acell_inv(algebraic_cell const& c) {
auto s = upm().eval_sign_at(c.m_p_sz, c.m_p, lower(&c));
return s == sign_zero || c.m_sign_lower == (s == sign_neg);

View file

@ -91,7 +91,7 @@ namespace polynomial {
*/
class power : public std::pair<var, unsigned> {
public:
power():std::pair<var, unsigned>() {}
power() = default;
power(var v, unsigned d):std::pair<var, unsigned>(v, d) {}
var get_var() const { return first; }
unsigned degree() const { return second; }
@ -1895,7 +1895,7 @@ namespace polynomial {
Invoke add(...), addmul(...) several times, and then invoke mk() to obtain the final polynomial.
*/
class som_buffer {
imp * m_owner;
imp * m_owner = nullptr;
monomial2pos m_m2pos;
numeral_vector m_tmp_as;
monomial_vector m_tmp_ms;
@ -1939,8 +1939,6 @@ namespace polynomial {
}
public:
som_buffer():m_owner(nullptr) {}
void reset() {
if (empty())
return;
@ -2236,12 +2234,10 @@ namespace polynomial {
In this buffer, each monomial can be added at most once.
*/
class cheap_som_buffer {
imp * m_owner;
imp * m_owner = nullptr;
numeral_vector m_tmp_as;
monomial_vector m_tmp_ms;
public:
cheap_som_buffer():m_owner(nullptr) {}
void set_owner(imp * o) { m_owner = o; }
bool empty() const { return m_tmp_ms.empty(); }
@ -3072,11 +3068,9 @@ namespace polynomial {
}
class newton_interpolator_vector {
imp * m_imp;
imp * m_imp = nullptr;
ptr_vector<newton_interpolator> m_data;
public:
newton_interpolator_vector():m_imp(nullptr) {}
~newton_interpolator_vector() {
flush();
}

View file

@ -64,7 +64,7 @@ namespace upolynomial {
public:
factorization_degree_set() { }
factorization_degree_set() = default;
factorization_degree_set(zp_factors const & factors)
{

View file

@ -36,9 +36,6 @@ mpz_matrix_manager::mpz_matrix_manager(unsynch_mpz_manager & nm, small_object_al
m_allocator(a) {
}
mpz_matrix_manager::~mpz_matrix_manager() {
}
void mpz_matrix_manager::mk(unsigned m, unsigned n, mpz_matrix & A) {
SASSERT(m > 0 && n > 0);
del(A);

View file

@ -63,7 +63,6 @@ class mpz_matrix_manager {
bool solve_core(mpz_matrix const & A, mpz * b, bool int_solver);
public:
mpz_matrix_manager(unsynch_mpz_manager & nm, small_object_allocator & a);
~mpz_matrix_manager();
unsynch_mpz_manager & nm() const { return m_nm; }
void mk(unsigned m, unsigned n, mpz_matrix & A);
void del(mpz_matrix & r);

View file

@ -410,8 +410,6 @@ namespace realclosure {
sbuffer<unsigned> m_szs; // size of each polynomial in the sequence
public:
scoped_polynomial_seq(imp & m):m_seq_coeffs(m) {}
~scoped_polynomial_seq() {
}
/**
\brief Add a new polynomial to the sequence.

View file

@ -71,7 +71,6 @@ public:
unsigned const* operator->() const { return &m_column; }
col_iterator& operator++() { next(); return *this; }
col_iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(col_iterator const& other) const { return m_column == other.m_column; }
bool operator!=(col_iterator const& other) const { return m_column != other.m_column; }
};
@ -88,7 +87,6 @@ public:
row* operator->() { return &m_row; }
row_iterator& operator++() { next(); return *this; }
row_iterator operator++(int) { auto tmp = *this; next(); return tmp; }
bool operator==(row_iterator const& other) const { return m_index == other.m_index; }
bool operator!=(row_iterator const& other) const { return m_index != other.m_index; }
};

View file

@ -43,7 +43,7 @@ namespace opt {
struct var {
unsigned m_id { 0 };
rational m_coeff;
var() {}
var() = default;
var(unsigned id, rational const& c): m_id(id), m_coeff(c) {}
struct compare {
bool operator()(var x, var y) {
@ -76,11 +76,11 @@ namespace opt {
// A definition is a linear term of the form (vars + coeff) / div
struct def {
def(): m_div(1) {}
def() = default;
def(row const& r, unsigned x);
vector<var> m_vars;
rational m_coeff;
rational m_div;
rational m_div{1};
def operator+(def const& other) const;
def operator/(unsigned n) const { return *this / rational(n); }
def operator/(rational const& n) const;

View file

@ -198,7 +198,6 @@ namespace simplex {
row_entry * operator->() const { return &(operator*()); }
row_iterator & operator++() { ++m_curr; move_to_used(); return *this; }
row_iterator operator++(int) { row_iterator tmp = *this; ++*this; return tmp; }
bool operator==(row_iterator const & it) const { return m_curr == it.m_curr; }
bool operator!=(row_iterator const & it) const { return m_curr != it.m_curr; }
};
@ -308,7 +307,6 @@ namespace simplex {
row operator*() { return row(m_curr); }
all_row_iterator & operator++() { m_curr++; move_to_next(); return *this; }
all_row_iterator operator++(int) { all_row_iterator tmp = *this; ++*this; return tmp; }
bool operator==(all_row_iterator const& it) const { return m_curr == it.m_curr; }
bool operator!=(all_row_iterator const& it) const { return m_curr != it.m_curr; }
};