summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-11-03 18:46:46 +0000
committerTim King <taking@cs.nyu.edu>2010-11-03 18:46:46 +0000
commiteec3e4b96a5ba3a0acfa22d4cd8896d9a5ea66c8 (patch)
tree1c074da07f36153f7c8bf46484a665ed02ee4f63 /src/theory
parent1528cf8a04d9ba35e5e78c50aaf6ff5b258fd52d (diff)
Adds size() to RowVector.
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/arith/row_vector.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/theory/arith/row_vector.h b/src/theory/arith/row_vector.h
index efb64d1c7..a967f8d68 100644
--- a/src/theory/arith/row_vector.h
+++ b/src/theory/arith/row_vector.h
@@ -73,13 +73,16 @@ protected:
public:
- //RowVector() : d_entries() {}
-
RowVector(const std::vector< ArithVar >& variables,
const std::vector< Rational >& coefficients,
std::vector<uint32_t>& counts);
+ /** Returns the number of nonzero variables in the vector. */
+ uint32_t size() const {
+ return d_entries.size();
+ }
+
//Iterates over the nonzero entries in the Vector
NonZeroIterator beginNonZero() const { return d_entries.begin(); }
NonZeroIterator endNonZero() const { return d_entries.end(); }
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback