mirror of
https://github.com/Z3Prover/z3
synced 2025-07-03 19:35:42 +00:00
updated display
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fb998485f1
commit
0900ea8f72
2 changed files with 15 additions and 13 deletions
|
@ -359,28 +359,32 @@ bool EGaussian::full_init(bool& created) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& PackedMatrix::display_dense(std::ostream& out) const {
|
std::ostream& PackedMatrix::display_dense(std::ostream& out) const {
|
||||||
for (unsigned rowIdx = 0; rowIdx < num_rows(); rowIdx++) {
|
unsigned rowIdx = 0;
|
||||||
const PackedRow& row = (*this)[rowIdx];
|
for (auto const& row : *this) {
|
||||||
for(int i = 0; i < row.get_size() * 64; i++)
|
for (int i = 0; i < row.get_size() * 64; i++)
|
||||||
out << (int)row[i];
|
out << (int)row[i];
|
||||||
out << " -- rhs: " << row.rhs() << " -- row: " << rowIdx << "\n";
|
out << " -- rhs: " << row.rhs() << " -- row: " << rowIdx << "\n";
|
||||||
|
++rowIdx;
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& PackedMatrix::display_sparse(std::ostream& out) const {
|
std::ostream& EGaussian::display(std::ostream& out) const {
|
||||||
for (auto const& row : *this) {
|
for (auto const& row : m_mat) {
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (int i = 0; i < row.get_size() * 64; ++i) {
|
for (int i = 0; i < row.get_size() * 64; ++i) {
|
||||||
if (row[i]) {
|
if (row[i]) {
|
||||||
|
if (first)
|
||||||
|
out << "(x";
|
||||||
|
int v = m_column_to_var[i];
|
||||||
if (first && !row.rhs())
|
if (first && !row.rhs())
|
||||||
out << -i-1 << " ";
|
v = -v;
|
||||||
else
|
out << " " << v;
|
||||||
out << i+1 << " ";
|
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out << "\n";
|
if (!first)
|
||||||
|
out << ")";
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,9 +547,7 @@ namespace xr {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& display_dense(std::ostream& out) const;
|
std::ostream& display_dense(std::ostream& out) const;
|
||||||
|
|
||||||
std::ostream& display_sparse(std::ostream& out) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
int64_t* mp = nullptr;
|
int64_t* mp = nullptr;
|
||||||
|
@ -614,7 +612,7 @@ namespace xr {
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& display(std::ostream& out) const { return m_mat.display_sparse(out); }
|
std::ostream& display(std::ostream& out) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
xr::solver& m_solver; // original sat solver
|
xr::solver& m_solver; // original sat solver
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue