mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
u_set replaced by indexed_uint_set (#6841)
* replace u_set by indexed_uint_set * replace u_set by indexed_uint_set * create insert-fresh and insert for indexed_uint_set to make use cases with non-fresh inserts easier Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * update nightly to pull arm Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * update nightly to pull arm Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fixing the build of lp_tst * update nightly to pull arm Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * replace u_set by indexed_uint_set * replace u_set by indexed_uint_set * fixing the build of lp_tst * remove unnecessery call to contains() before insert to indexed_uint_set * formatting, no check for contains() in indexed_uint_set, always init m_touched_rows to nullptr --------- Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4637339091
commit
f58b703ac5
21 changed files with 69 additions and 192 deletions
|
@ -32,7 +32,6 @@ random_updater::random_updater(
|
|||
const vector<unsigned> & column_indices) :
|
||||
m_lar_solver(lar_solver),
|
||||
m_range(100000) {
|
||||
m_var_set.resize(m_lar_solver.number_of_vars());
|
||||
for (unsigned j : column_indices)
|
||||
m_var_set.insert(j);
|
||||
TRACE("lar_solver_rand", tout << "size = " << m_var_set.size() << "\n";);
|
||||
|
@ -45,7 +44,9 @@ bool random_updater::shift_var(unsigned j) {
|
|||
if (ret) {
|
||||
const auto & A = m_lar_solver.A_r();
|
||||
for (const auto& c : A.m_columns[j]) {
|
||||
m_var_set.erase(m_lar_solver.r_basis()[c.var()]);
|
||||
unsigned k = m_lar_solver.r_basis()[c.var()];
|
||||
if (m_var_set.contains(k))
|
||||
m_var_set.remove(k);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
@ -54,7 +55,11 @@ bool random_updater::shift_var(unsigned j) {
|
|||
|
||||
void random_updater::update() {
|
||||
// VERIFY(m_lar_solver.check_feasible());
|
||||
auto columns = m_var_set.index(); // m_var_set is going to change during the loop
|
||||
unsigned_vector columns;
|
||||
// m_var_set is going to change during the loop, make a copy
|
||||
for (unsigned j : m_var_set) {
|
||||
columns.push_back(j);
|
||||
}
|
||||
for (auto j : columns) {
|
||||
if (!m_var_set.contains(j)) {
|
||||
TRACE("lar_solver_rand", tout << "skipped " << j << "\n";);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue