From f234fd50ce8a6f8a006b0f770cca5170a55232f9 Mon Sep 17 00:00:00 2001 From: graehl Date: Sun, 25 Jul 2010 02:53:05 +0000 Subject: method that might help phil compile his local stuff (trunk was fine) git-svn-id: https://ws10smt.googlecode.com/svn/trunk@406 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/sparse_vector.h | 2 ++ 1 file changed, 2 insertions(+) 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]; -- cgit v1.2.3