diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-03 23:56:37 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-03 23:56:37 +0300 |
commit | b5d914134accaf5cdf39a94f61c581545e5803f6 (patch) | |
tree | 3b43f84243bac7e9cc86b7cf19736e14c28db265 /moses/Hypothesis.cpp | |
parent | c5c08993dec4dcc14e418136fa04d1a2ca08ccad (diff) |
move beats() out of #ifdef region
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r-- | moses/Hypothesis.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index 4c8598638..c26889275 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -600,6 +600,22 @@ bool Hypothesis::operator==(const Hypothesis& other) const return true; } +bool +Hypothesis:: +beats(Hypothesis const& b) const +{ + if (m_totalScore != b.m_totalScore) + return m_totalScore > b.m_totalScore; + else if (m_futureScore != b.m_futureScore) + return m_futureScore > b.m_futureScore; + else if (m_prevHypo) + return b.m_prevHypo ? m_prevHypo->beats(*b.m_prevHypo) : true; + else return false; + // TO DO: add more tie breaking here + // results. We should compare other property of the hypos here. + // On the other hand, how likely is this going to happen? +} + #ifdef HAVE_XMLRPC_C void Hypothesis:: @@ -632,23 +648,6 @@ OutputWordAlignment(vector<xmlrpc_c::value>& out) const tmp[i]->OutputLocalWordAlignment(out); } -bool -Hypothesis:: -beats(Hypothesis const& b) const -{ - if (m_totalScore != b.m_totalScore) - return m_totalScore > b.m_totalScore; - else if (m_futureScore != b.m_futureScore) - return m_futureScore > b.m_futureScore; - else if (m_prevHypo) - return b.m_prevHypo ? m_prevHypo->beats(*b.m_prevHypo) : true; - else return false; - // TO DO: add more tie breaking here - // results. We should compare other property of the hypos here. - // On the other hand, how likely is this going to happen? -} - - #endif |