summaryrefslogtreecommitdiff
path: root/decoder/sparse_vector.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-25 02:53:05 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-25 02:53:05 +0000
commitf234fd50ce8a6f8a006b0f770cca5170a55232f9 (patch)
tree5f662c4055fc37788098b17b2341823b943982f8 /decoder/sparse_vector.h
parent786b689a486413b4ea31841eb352ed728621e4b1 (diff)
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
Diffstat (limited to 'decoder/sparse_vector.h')
-rw-r--r--decoder/sparse_vector.h2
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];