diff options
Diffstat (limited to 'moses/src/ChartTrellisNode.h')
-rw-r--r-- | moses/src/ChartTrellisNode.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/moses/src/ChartTrellisNode.h b/moses/src/ChartTrellisNode.h index e8d6b55ac..7b81ff4b2 100644 --- a/moses/src/ChartTrellisNode.h +++ b/moses/src/ChartTrellisNode.h @@ -28,39 +28,39 @@ namespace Moses { class ScoreComponentCollection; class ChartHypothesis; +class ChartTrellisDetour; class ChartTrellisNode { - friend std::ostream& operator<<(std::ostream&, const ChartTrellisNode&); -public: + public: typedef std::vector<ChartTrellisNode*> NodeChildren; -protected: - const ChartHypothesis *m_hypo; - NodeChildren m_edge; - -public: - ChartTrellisNode(const ChartHypothesis *hypo); - ChartTrellisNode(const ChartTrellisNode &origNode - , const ChartTrellisNode &soughtNode - , const ChartHypothesis &replacementHypo - , ScoreComponentCollection &scoreChange - , const ChartTrellisNode *&nodeChanged); + ChartTrellisNode(const ChartHypothesis &hypo); + ChartTrellisNode(const ChartTrellisDetour &, ChartTrellisNode *&); + ~ChartTrellisNode(); - const ChartHypothesis &GetHypothesis() const { - return *m_hypo; - } + const ChartHypothesis &GetHypothesis() const { return m_hypo; } - const NodeChildren &GetChildren() const { - return m_edge; - } + const NodeChildren &GetChildren() const { return m_children; } - const ChartTrellisNode &GetChild(size_t ind) const { - return *m_edge[ind]; - } + const ChartTrellisNode &GetChild(size_t i) const { return *m_children[i]; } Phrase GetOutputPhrase() const; + + private: + ChartTrellisNode(const ChartTrellisNode &); // Not implemented + ChartTrellisNode& operator=(const ChartTrellisNode &); // Not implemented + + ChartTrellisNode(const ChartTrellisNode &, const ChartTrellisNode &, + const ChartHypothesis &, ChartTrellisNode *&); + + void CreateChildren(); + void CreateChildren(const ChartTrellisNode &, const ChartTrellisNode &, + const ChartHypothesis &, ChartTrellisNode *&); + + const ChartHypothesis &m_hypo; + NodeChildren m_children; }; } |