return out;
}
+
+void ArithPriorityQueue::reduce(){
+ vector<ArithVar> contents;
+
+ if(inCollectionMode()){
+ contents = d_candidates;
+ } else {
+ ArithVar res = ARITHVAR_SENTINEL;
+ while((res = dequeueInconsistentBasicVariable()) != ARITHVAR_SENTINEL){
+ contents.push_back(res);
+ }
+ }
+ clear();
+ for(vector<ArithVar>::const_iterator iter = contents.begin(), end = contents.end(); iter != end; ++iter){
+ ArithVar curr = *iter;
+ if(d_tableau.isBasic(curr)){
+ enqueueIfInconsistent(curr);
+ }
+ }
+}
void clear();
+ /**
+ * Reduces the queue to only contain the subset that is still basic
+ * and inconsistent.
+ *Currently, O(n log n) for an easy obviously correct implementation in all modes..
+ */
+ void reduce();
+
bool collectionModeContains(ArithVar v) const {
Assert(inCollectionMode());
return d_varSet.isMember(v);