diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2018-12-10 15:29:58 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2018-12-10 15:29:58 +0300 |
commit | 20edd331bc52cd464262049126f6e826153ae359 (patch) | |
tree | 60da417e8139bcbf7cdc5ecc43791d8337e126b2 | |
parent | c7533506418d11a13dba81468d2bd2020a50abea (diff) |
debug
-rw-r--r-- | moses2/HypothesisColl.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/moses2/HypothesisColl.cpp b/moses2/HypothesisColl.cpp index 18046bd4c..94927afd7 100644 --- a/moses2/HypothesisColl.cpp +++ b/moses2/HypothesisColl.cpp @@ -126,11 +126,16 @@ StackAdd HypothesisColl::Add(const HypothesisBase *hypo) const_cast<const HypothesisBase *&>(hypoExisting1); hypoExisting2 = hypo; - //cerr << "Added " << hypo << " dicard existing " << hypoExisting2 << endl; + cerr << "Added " << hypo << "(" << hypo->hash() << ")" + << " discard existing " << hypoExisting << "(" << hypoExisting->hash() << ")" + << endl; + return StackAdd(true, hypoExisting); } else { // already storing the best hypo. discard incoming hypo - //cerr << "Keep existing " << hypoExisting << " dicard new " << hypo << endl; + cerr << "Keep existing " << hypoExisting << "(" << hypoExisting->hash() << ")" + << " discard new " << hypo << "(" << hypo->hash() << ")" + << endl; return StackAdd(false, hypoExisting); } } @@ -251,7 +256,8 @@ void HypothesisColl::SortHypos(const ManagerBase &mgr, const HypothesisBase **so void HypothesisColl::Delete(const HypothesisBase *hypo) { - //cerr << "hypo=" << hypo << " " << m_coll.size() << endl; + cerr << " Delete hypo=" << hypo << "(" << hypo->hash() << ")" + << " m_coll=" << m_coll.size() << endl; size_t erased = m_coll.erase(hypo); UTIL_THROW_IF2(erased != 1, "couldn't erase hypo " << hypo); |