diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-11-02 03:00:37 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-11-02 03:00:37 +0300 |
commit | f38976aba07e0dbca74f9b824b28add486889b2a (patch) | |
tree | 54d2a68a9da692ba4e8fc91d339523e9874acd66 /moses/AlignmentInfo.cpp | |
parent | 8424fb6e2ad8e9d15471c7e610bce85082610a41 (diff) |
daily automatic beautifier
Diffstat (limited to 'moses/AlignmentInfo.cpp')
-rw-r--r-- | moses/AlignmentInfo.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/moses/AlignmentInfo.cpp b/moses/AlignmentInfo.cpp index 15e8b6d52..fb86be207 100644 --- a/moses/AlignmentInfo.cpp +++ b/moses/AlignmentInfo.cpp @@ -106,9 +106,9 @@ std::set<size_t> AlignmentInfo::GetAlignmentsForTarget(size_t targetPos) const } -bool -compare_target(std::pair<size_t,size_t> const* a, - std::pair<size_t,size_t> const* b) +bool +compare_target(std::pair<size_t,size_t> const* a, + std::pair<size_t,size_t> const* b) { if(a->second < b->second) return true; if(a->second == b->second) return (a->first < b->first); @@ -116,29 +116,29 @@ compare_target(std::pair<size_t,size_t> const* a, } -std::vector< const std::pair<size_t,size_t>* > +std::vector< const std::pair<size_t,size_t>* > AlignmentInfo:: GetSortedAlignments(WordAlignmentSort SortOrder) const { std::vector< const std::pair<size_t,size_t>* > ret; - + CollType::const_iterator iter; for (iter = m_collection.begin(); iter != m_collection.end(); ++iter) { const std::pair<size_t,size_t> &alignPair = *iter; ret.push_back(&alignPair); } - + switch (SortOrder) { case NoSort: break; - + case TargetOrder: std::sort(ret.begin(), ret.end(), compare_target); break; - + default: - UTIL_THROW(util::Exception, "Unknown word alignment sort option: " - << SortOrder); + UTIL_THROW(util::Exception, "Unknown word alignment sort option: " + << SortOrder); } return ret; |