rename m_worseScore -> m_minBeamScore

This commit is contained in:
Hieu Hoang 2016-12-01 15:31:22 +00:00
parent ef105a1a9b
commit a269d9ab71
2 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ HypothesisColl::HypothesisColl(const ManagerBase &mgr)
,m_sortedHypos(NULL)
{
m_bestScore = -std::numeric_limits<float>::infinity();
m_worstScore = -std::numeric_limits<float>::infinity();
m_minBeamScore = -std::numeric_limits<float>::infinity();
}
const HypothesisBase *HypothesisColl::GetBestHypo() const
@ -57,11 +57,11 @@ void HypothesisColl::Add(
cerr << "scores:"
<< futureScore << " "
<< m_bestScore << " "
<< m_worstScore << " "
<< m_minBeamScore << " "
<< GetSize() << " "
<< endl;
*/
if (futureScore < m_worstScore) {
if (futureScore < m_minBeamScore) {
// beam threshold
//cerr << "Discard:" << hypo->Debug(system) << endl;
hypoRecycle.Recycle(hypo);
@ -75,8 +75,8 @@ void HypothesisColl::Add(
// this may also affect the worst score
SCORE beamWidth = system.options.search.beam_width;
//cerr << "beamWidth=" << beamWidth << endl;
if ( m_bestScore + beamWidth > m_worstScore ) {
m_worstScore = m_bestScore + beamWidth;
if ( m_bestScore + beamWidth > m_minBeamScore ) {
m_minBeamScore = m_bestScore + beamWidth;
}
}
@ -204,7 +204,7 @@ void HypothesisColl::Clear()
m_sortedHypos = NULL;
m_coll.clear();
m_bestScore = -std::numeric_limits<float>::infinity();
m_worstScore = -std::numeric_limits<float>::infinity();
m_minBeamScore = -std::numeric_limits<float>::infinity();
}
std::string HypothesisColl::Debug(const System &system) const

View File

@ -61,7 +61,7 @@ protected:
mutable Hypotheses *m_sortedHypos;
SCORE m_bestScore;
SCORE m_worstScore;
SCORE m_minBeamScore;
StackAdd Add(const HypothesisBase *hypo);
void SortAndPruneHypos(const ManagerBase &mgr, ArcLists &arcLists) const;