summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-10-29 15:51:25 +0000
committerTim King <taking@cs.nyu.edu>2010-10-29 15:51:25 +0000
commit2771a78471f42951a01a269e4ea8b993d3807533 (patch)
tree5eaccd9289034576e5f06c75766e900b7eb0425d
parent7d4a5842ea4f53fe2e05f336c9342db9b94a31f1 (diff)
Fixes RowVector::has().
-rw-r--r--src/theory/arith/row_vector.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/theory/arith/row_vector.h b/src/theory/arith/row_vector.h
index 2c88721ea..d68f8bc30 100644
--- a/src/theory/arith/row_vector.h
+++ b/src/theory/arith/row_vector.h
@@ -104,8 +104,7 @@ public:
/** Returns true if the variable is in the row. */
bool has(ArithVar x_j) const{
- NonZeroIterator lb = lower_bound(x_j);
- return getArithVar(*lb) == x_j;
+ return std::binary_search(d_entries.begin(), d_entries.end(), make_pair(x_j,0), cmp);
}
/**
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback