mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
change lar_terms to use column indices
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
3313590b95
commit
c2e5cd78c8
13 changed files with 88 additions and 103 deletions
|
@ -123,8 +123,7 @@ public:
|
|||
const mpq & m_coeff;
|
||||
public:
|
||||
ival(unsigned var, const mpq & val) : m_var(var), m_coeff(val) { }
|
||||
unsigned raw() const { return m_var; }
|
||||
tv var() const { return tv::raw(m_var); }
|
||||
column_index column() const { return column_index(m_var); }
|
||||
const mpq & coeff() const { return m_coeff; }
|
||||
};
|
||||
|
||||
|
@ -143,13 +142,13 @@ public:
|
|||
lpvar min_var = -1;
|
||||
mpq c;
|
||||
for (const auto & p : *this) {
|
||||
if (p.var().index() < min_var) {
|
||||
min_var = p.var().index();
|
||||
if (p.column() < min_var) {
|
||||
min_var = p.column();
|
||||
}
|
||||
}
|
||||
lar_term r;
|
||||
for (const auto & p : *this) {
|
||||
if (p.var().index() == min_var) {
|
||||
if (p.column() == min_var) {
|
||||
return p.coeff().is_one();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue