summaryrefslogtreecommitdiff
path: root/decoder/sparse_vector.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 19:21:02 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-08 19:21:02 +0000
commitb8cd8c32c7a89f99f3d8b8813d11517e89ecf022 (patch)
treec2867ddd9a2690e74b03062d71308ad1081d0bcb /decoder/sparse_vector.h
parente202d85c10942fd586088207a55226cc1eb1a01e (diff)
actually use -n feature_name in LanguageModel. FF factory usage facility, FF feature ids facility (not used yet)
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@186 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/sparse_vector.h')
-rw-r--r--decoder/sparse_vector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/sparse_vector.h b/decoder/sparse_vector.h
index 7794fd5e..be91f324 100644
--- a/decoder/sparse_vector.h
+++ b/decoder/sparse_vector.h
@@ -19,9 +19,9 @@ public:
typedef typename std::map<int, T>::const_iterator const_iterator;
SparseVector() {}
explicit SparseVector(std::vector<T> const& v) {
- MapType::iterator p=values_.end();
+ typename MapType::iterator p=values_.begin();
for (unsigned i=0;i<v.size();++i)
- p=values_.insert(p,MapType::value_type(i,v[i])); //faster
+ p=values_.insert(p,typename MapType::value_type(i,v[i])); //faster
}
const T operator[](int index) const {