From 00be683d744ea87e67dd13db08e4a17531bfb1f3 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 23 Jul 2010 19:17:22 +0000 Subject: 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 --- decoder/hg.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'decoder/hg.cc') 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; -- cgit v1.2.3