diff options
author | Tim King <taking@cs.nyu.edu> | 2010-11-03 18:46:46 +0000 |
---|---|---|
committer | Tim King <taking@cs.nyu.edu> | 2010-11-03 18:46:46 +0000 |
commit | eec3e4b96a5ba3a0acfa22d4cd8896d9a5ea66c8 (patch) | |
tree | 1c074da07f36153f7c8bf46484a665ed02ee4f63 | |
parent | 1528cf8a04d9ba35e5e78c50aaf6ff5b258fd52d (diff) |
Adds size() to RowVector.
-rw-r--r-- | src/theory/arith/row_vector.h | 7 |
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(); } |