diff options
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/sparse_vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/sparse_vector.h b/decoder/sparse_vector.h index 0325c1ee..8fc0f520 100644 --- a/decoder/sparse_vector.h +++ b/decoder/sparse_vector.h @@ -106,6 +106,8 @@ public: return found==values_.end()?T():found->second; } + T value(int i) const { return get(i); } + // same as above but may add a 0 entry. TODO: check that people relying on no entry use get T & operator[](int index){ return values_[index]; |