diff options
author | Christian Buck <cbuck@lantis.de> | 2013-03-19 22:21:35 +0400 |
---|---|---|
committer | Christian Buck <cbuck@lantis.de> | 2013-03-19 22:21:35 +0400 |
commit | 6efa1681fc9f385bcdec1243ef059203812018c0 (patch) | |
tree | 2cb1ef61b2c7f926712d471eccf57f18b2e928de /moses/Manager.h | |
parent | 55f02f2fecc9bfdb6720f84beb1b94733166ec64 (diff) |
added operator< to SearchGraphNode - compares Ids
Diffstat (limited to 'moses/Manager.h')
-rw-r--r-- | moses/Manager.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/moses/Manager.h b/moses/Manager.h index e2f8ed8e5..11762ec37 100644 --- a/moses/Manager.h +++ b/moses/Manager.h @@ -56,6 +56,10 @@ struct SearchGraphNode { hypo(theHypo), recombinationHypo(theRecombinationHypo), forward(theForward), fscore(theFscore) {} + bool operator<(const SearchGraphNode& sgn) const { + return this->hypo->GetId() < sgn.hypo->GetId(); + } + }; /** The Manager class implements a stack decoding algorithm for phrase-based decoding @@ -104,7 +108,7 @@ private: // Helper functions to output search graph in the hypergraph format of Kenneth Heafield's lazy hypergraph decoder void OutputFeatureValuesForHypergraph(const Hypothesis* hypo, std::ostream &outputSearchGraphStream) const; size_t OutputFeatureValuesForHypergraph(size_t index, const Hypothesis* hypo, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const; - + protected: // data |