summaryrefslogtreecommitdiff
path: root/decoder
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
commitf82319b54067bef668ea87b5022eba5ded09ba87 (patch)
tree79c5ba79745e09674bd866d2a12e1e9770d4fdfd /decoder
parent279bc261148978c4ac3e5e4e8e9ef689ca0c25ca (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')
-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];