Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-04-24 16:44:11 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-04-24 16:44:11 +0400
commit2d265344d1ea6365a7a7bcbdb70dc16451a5350e (patch)
treed3464e92f1d45dc276851459859ef7e50da8469b /moses/Hypothesis.h
parentd9b17843735d74bcc0d906054b1d4b03939b98e9 (diff)
delete m_currScoreBreakdown
Diffstat (limited to 'moses/Hypothesis.h')
-rw-r--r--moses/Hypothesis.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/moses/Hypothesis.h b/moses/Hypothesis.h
index 48b563e65..27de9fb75 100644
--- a/moses/Hypothesis.h
+++ b/moses/Hypothesis.h
@@ -79,8 +79,7 @@ protected:
bool m_wordDeleted;
float m_totalScore; /*! score so far */
float m_futureScore; /*! estimated future cost to translate rest of sentence */
- mutable std::auto_ptr<ScoreComponentCollection> m_scoreBreakdown; /*! detailed score break-down by components (for instance language model, word penalty, etc) */
- ScoreComponentCollection m_currScoreBreakdown; /*! scores for this hypothesis */
+ ScoreComponentCollection m_scoreBreakdown; /*! scores for this hypothesis */
std::vector<const FFState*> m_ffStates;
const Hypothesis *m_winningHypo;
ArcList *m_arcList; /*! all arcs that end at the same trellis point as this hypothesis */
@@ -238,13 +237,7 @@ public:
return m_arcList;
}
const ScoreComponentCollection& GetScoreBreakdown() const {
- if (!m_scoreBreakdown.get()) {
- m_scoreBreakdown.reset(new ScoreComponentCollection(m_currScoreBreakdown));
- if (m_prevHypo) {
- m_scoreBreakdown->PlusEquals(m_prevHypo->GetScoreBreakdown());
- }
- }
- return *m_scoreBreakdown;
+ return m_scoreBreakdown;
}
float GetTotalScore() const {
return m_totalScore;