From ead8845217c5e6e48f3680ead6f859ec8e110eb2 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 13 Aug 2010 08:20:47 +0000 Subject: (NEEDS TESTING) cfg index rules->nts, sort by prob, remove duplicates keeping highest prob, topo sort (and after binarize topo sort). beginning to apply_fsa_models (PrefixTrieNode) git-svn-id: https://ws10smt.googlecode.com/svn/trunk@539 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/exp_semiring.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'decoder/exp_semiring.h') diff --git a/decoder/exp_semiring.h b/decoder/exp_semiring.h index f91beee4..111eaaf1 100644 --- a/decoder/exp_semiring.h +++ b/decoder/exp_semiring.h @@ -14,7 +14,7 @@ // PType scalar, RType vector // BAD examples: // PType vector, RType scalar -template +template struct PRPair { PRPair() : p(), r() {} // Inside algorithm requires that T(0) and T(1) @@ -35,26 +35,26 @@ struct PRPair { RType r; }; -template +template std::ostream& operator<<(std::ostream& o, const PRPair& x) { return o << '<' << x.p << ", " << x.r << '>'; } -template +template const PRPair operator+(const PRPair& a, const PRPair& b) { PRPair result = a; result += b; return result; } -template +template const PRPair operator*(const PRPair& a, const PRPair& b) { PRPair result = a; result *= b; return result; } -template +template struct PRWeightFunction { explicit PRWeightFunction(const PWeightFunction& pwf = PWeightFunction(), const RWeightFunction& rwf = RWeightFunction()) : -- cgit v1.2.3