TrellisPath::InitTotalScore() and TrellisPath::GetScoreBreakDown() now use compute m_totalScore again in an identical fashion.

This commit is contained in:
Ulrich Germann 2016-01-19 18:45:23 +00:00
parent 3a87b8f193
commit ffdc9711e9

View File

@ -42,7 +42,7 @@ TrellisPath::TrellisPath(const Hypothesis *hypo)
void TrellisPath::InitTotalScore()
{
m_totalScore = m_path[0]->GetWinningHypo()->GetFutureScore();
m_totalScore = m_path[0]->GetWinningHypo()->GetFutureScore();
//calc score
size_t sizePath = m_path.size();
@ -50,7 +50,7 @@ void TrellisPath::InitTotalScore()
const Hypothesis *hypo = m_path[pos];
const Hypothesis *winningHypo = hypo->GetWinningHypo();
if (hypo != winningHypo) {
m_totalScore = m_totalScore - winningHypo->GetFutureScore() + hypo->GetFutureScore();
m_totalScore += hypo->GetFutureScore() - winningHypo->GetFutureScore();
}
}
}