3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 05:18:44 +00:00

change lar_term into a class and make lar_terms::m_coeffs private

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-05-01 10:55:26 -07:00
parent f170d80d38
commit c74893016a

View file

@ -20,12 +20,10 @@
#pragma once
#include "util/lp/indexed_vector.h"
#include "util/map.h"
namespace lp {
class lar_term {
// the term evaluates to sum of m_coeffs
u_map<mpq> m_coeffs;
// mpq m_v;
public:
lar_term() {}
void add_monomial(const mpq& c, unsigned j) {
@ -40,6 +38,11 @@ public:
m_coeffs.erase(j);
}
}
void add_var(unsigned j) {
rational c(1);
add_monomial(c, j);
}
bool is_empty() const {
return m_coeffs.empty(); // && is_zero(m_v);