From: Tim King Date: Wed, 3 Nov 2010 18:46:46 +0000 (+0000) Subject: Adds size() to RowVector. X-Git-Tag: cvc5-1.0.0~8750 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eec3e4b96a5ba3a0acfa22d4cd8896d9a5ea66c8;p=cvc5.git Adds size() to RowVector. --- 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& 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(); }