diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-09-26 02:00:40 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-09-26 02:00:40 +0300 |
commit | 82527fc8b247ed34947c33ba808a92a1c07b054b (patch) | |
tree | e5fad527c8ce93435926269e812b931eee20e177 /moses/BitmapContainer.h | |
parent | a052837a3a85325064da8b4c36e04a63af30daa0 (diff) |
daily automatic beautifier
Diffstat (limited to 'moses/BitmapContainer.h')
-rw-r--r-- | moses/BitmapContainer.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/moses/BitmapContainer.h b/moses/BitmapContainer.h index 88bc79efe..fcf56611f 100644 --- a/moses/BitmapContainer.h +++ b/moses/BitmapContainer.h @@ -75,8 +75,7 @@ public: , m_translation_pos(translation_pos) , m_hypothesis(hypothesis) , m_edge(edge) { - if (target_phrase != NULL) - { + if (target_phrase != NULL) { m_target_phrase.reset(new TargetPhrase(*target_phrase)); } } @@ -113,21 +112,15 @@ public: float scoreA = itemA->GetHypothesis()->GetTotalScore(); float scoreB = itemB->GetHypothesis()->GetTotalScore(); - if (scoreA < scoreB) - { + if (scoreA < scoreB) { return true; - } - else if (scoreA > scoreB) - { + } else if (scoreA > scoreB) { return false; - } - else - { + } else { // Equal scores: break ties by comparing target phrases (if they exist) boost::shared_ptr<TargetPhrase> phrA = itemA->GetTargetPhrase(); boost::shared_ptr<TargetPhrase> phrB = itemB->GetTargetPhrase(); - if (!phrA || !phrB) - { + if (!phrA || !phrB) { // Fallback: scoreA < scoreB == false, non-deterministic sort return false; } |