diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 17:19:18 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 17:19:18 +0200 |
commit | eecf255ed7aaabb9ce2decd80dd115240e468327 (patch) | |
tree | 034c9c6ed440d80abc93ed81b472114827c26631 /utils/fast_sparse_vector.h | |
parent | 3607e00fec971d2a58a638ade53870aac0d31208 (diff) |
reverted changes in upstream
Diffstat (limited to 'utils/fast_sparse_vector.h')
-rw-r--r-- | utils/fast_sparse_vector.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/fast_sparse_vector.h b/utils/fast_sparse_vector.h index 2c49948c..af832950 100644 --- a/utils/fast_sparse_vector.h +++ b/utils/fast_sparse_vector.h @@ -196,7 +196,7 @@ class FastSparseVector { else return local_size_; } - size_t size_nonzero() const { + size_t num_nonzero() const { size_t sz = 0; const_iterator it = this->begin(); for (; it != this->end(); ++it) { @@ -229,12 +229,11 @@ class FastSparseVector { return *this; } template <typename O> - inline FastSparseVector<O>& plus_eq_v_times_s(const FastSparseVector<O>& other, const O scalar) { + inline void plus_eq_v_times_s(const FastSparseVector<O>& other, const O scalar) { const typename FastSparseVector<O>::const_iterator end = other.end(); for (typename FastSparseVector<O>::const_iterator it = other.begin(); it != end; ++it) { get_or_create_bin(it->first) += it->second * scalar; } - return *this; } inline FastSparseVector& operator-=(const FastSparseVector& other) { const typename FastSparseVector::const_iterator end = other.end(); |