ChartTrellisPath::ChartTrellisPath(const ChartHypothesis &hypo) : m_finalNode(new ChartTrellisNode(hypo)) , m_deviationPoint(NULL) , m_scoreBreakdown(hypo.GetScoreBreakdown()) , m_totalScore(hypo.GetTotalScore()) { }
ChartTrellisDetour::ChartTrellisDetour( boost::shared_ptr<const ChartTrellisPath> basePath, const ChartTrellisNode &substitutedNode, const ChartHypothesis &replacementHypo) : m_basePath(basePath) , m_substitutedNode(substitutedNode) , m_replacementHypo(replacementHypo) { float diff = replacementHypo.GetTotalScore() - substitutedNode.GetHypothesis().GetTotalScore(); m_totalScore = basePath->GetTotalScore() + diff; }