diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-04-09 13:33:33 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-04-09 13:33:33 +0400 |
commit | 65326f205f6e78184d8dfc4e5230dc5f4055815d (patch) | |
tree | f5b5c6d36b37c7e665914746e2911aed13633281 /moses/HypothesisStackCubePruning.cpp | |
parent | 0e98f1bc06602a041ca92bf24441ba19d0a8ab70 (diff) |
-stack 0 means no stack pruning
Diffstat (limited to 'moses/HypothesisStackCubePruning.cpp')
-rw-r--r-- | moses/HypothesisStackCubePruning.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/moses/HypothesisStackCubePruning.cpp b/moses/HypothesisStackCubePruning.cpp index d36323fb2..febb56e9a 100644 --- a/moses/HypothesisStackCubePruning.cpp +++ b/moses/HypothesisStackCubePruning.cpp @@ -153,6 +153,8 @@ void HypothesisStackCubePruning::AddInitial(Hypothesis *hypo) void HypothesisStackCubePruning::PruneToSize(size_t newSize) { + if ( newSize == 0) return; // no limit + if (m_hypos.size() > newSize) { // ok, if not over the limit priority_queue<float> bestScores; |