diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 19:17:22 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 19:17:22 +0000 |
commit | a2d9d0f96502c7d3c04303f3db36a8602d992287 (patch) | |
tree | f627e30f0005f1cec4d234d814cd7c6a3f060acf /decoder/hg.cc | |
parent | c57c05d19fb306f7f50cc02516a8a2901c920cca (diff) |
sparse_vector use google::dense_hash_map, fsa scan logging
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@383 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r-- | decoder/hg.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/decoder/hg.cc b/decoder/hg.cc index f0d6b3d5..5a33fc97 100644 --- a/decoder/hg.cc +++ b/decoder/hg.cc @@ -54,12 +54,13 @@ struct ScaledTransitionEventWeightFunction { // safe to reinterpret a vector of these as a vector of prob_t (plain old data) struct TropicalValue { TropicalValue() : v_() {} - explicit TropicalValue(int v) { + TropicalValue(int v) { if (v == 0) v_ = prob_t::Zero(); else if (v == 1) v_ = prob_t::One(); else { cerr << "Bad value in TropicalValue(int).\n"; abort(); } } - explicit TropicalValue(const prob_t& v) : v_(v) {} + TropicalValue(unsigned v) : v_(v) {} + TropicalValue(const prob_t& v) : v_(v) {} inline TropicalValue& operator+=(const TropicalValue& o) { if (v_ < o.v_) v_ = o.v_; return *this; |