mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
Minor reformatting.
This commit is contained in:
parent
622d33c18d
commit
5b9e0a7f9a
@ -35,11 +35,11 @@ struct CompareTargetPhrase {
|
||||
|
||||
void TargetPhraseCollection::NthElement(size_t tableLimit)
|
||||
{
|
||||
vector<TargetPhrase*>::iterator
|
||||
iterMiddle = (tableLimit == 0 || m_collection.size() < tableLimit) ?m_collection.end() : m_collection.begin() + tableLimit;
|
||||
|
||||
//std::sort(m_collection.begin(), m_collection.end(), CompareTargetPhrase());
|
||||
std::nth_element(m_collection.begin(), iterMiddle, m_collection.end(), CompareTargetPhrase());
|
||||
vector<TargetPhrase*>::iterator nth;
|
||||
nth = (tableLimit && tableLimit <= m_collection.size()
|
||||
? m_collection.begin() + tableLimit
|
||||
: m_collection.end());
|
||||
std::nth_element(m_collection.begin(), nth, m_collection.end(), CompareTargetPhrase());
|
||||
}
|
||||
|
||||
void TargetPhraseCollection::Prune(bool adhereTableLimit, size_t tableLimit)
|
||||
|
Loading…
Reference in New Issue
Block a user