summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2011-03-17 21:28:50 +0000
committerTim King <taking@cs.nyu.edu>2011-03-17 21:28:50 +0000
commit0c03497201fb4600ea8dc6e5e8638cd7e21060a9 (patch)
treef20434384220529c19515fd999adc4883be0ea5a
parent0e22528f5d249e301b2a5dc1f14849a7f8e25439 (diff)
Switched SimplexDecisionProcedure::d_delayedLemmas from a vector to a queue.
-rw-r--r--src/theory/arith/simplex.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/theory/arith/simplex.h b/src/theory/arith/simplex.h
index 968275ae5..66d0a97da 100644
--- a/src/theory/arith/simplex.h
+++ b/src/theory/arith/simplex.h
@@ -15,7 +15,7 @@
#include "util/stats.h"
-#include <vector>
+#include <queue>
namespace CVC4 {
namespace theory {
@@ -35,8 +35,7 @@ private:
ArithVar d_numVariables;
- std::vector<Node> d_delayedLemmas;
- uint32_t d_delayedLemmasPos;
+ std::queue<Node> d_delayedLemmas;
Rational d_ZERO;
@@ -48,7 +47,6 @@ public:
d_queue(pm, tableau),
d_numVariables(0),
d_delayedLemmas(),
- d_delayedLemmasPos(0),
d_ZERO(0)
{}
@@ -219,20 +217,20 @@ public:
/** Returns true if the simplex procedure has more delayed lemmas in its queue.*/
bool hasMoreLemmas() const {
- return d_delayedLemmasPos < d_delayedLemmas.size();
+ return !d_delayedLemmas.empty();
}
/** Returns the next delayed lemmas on the queue.*/
Node popLemma(){
Assert(hasMoreLemmas());
- Node lemma = d_delayedLemmas[d_delayedLemmasPos];
- ++d_delayedLemmasPos;
+ Node lemma = d_delayedLemmas.front();
+ d_delayedLemmas.pop();
return lemma;
}
private:
/** Adds a lemma to the queue. */
void pushLemma(Node lemma){
- d_delayedLemmas.push_back(lemma);
+ d_delayedLemmas.push(lemma);
++(d_statistics.d_delayedConflicts);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback