summaryrefslogtreecommitdiff
path: root/decoder/apply_models.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-12 03:42:39 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-12 03:42:39 +0000
commit7220bd3685bb7cbd6a68749f55314892af5605c9 (patch)
tree524621fbdb2a2a3a4bfceb82bca72172f12412d1 /decoder/apply_models.cc
parent1cf86da06f6a0ab5d9a78bd39a1627df142ea8c5 (diff)
inebriated, but sped up inside/outside pruning and made cube poplimit scale with promise of nodes from previous global pruning, if --promise_power=N for N>0.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@219 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/apply_models.cc')
-rw-r--r--decoder/apply_models.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/apply_models.cc b/decoder/apply_models.cc
index 78f37e68..4093f667 100644
--- a/decoder/apply_models.cc
+++ b/decoder/apply_models.cc
@@ -254,7 +254,8 @@ public:
make_heap(cand.begin(), cand.end(), HeapCandCompare());
State2Node state2node; // "buf" in Figure 2
int pops = 0;
- while(!cand.empty() && pops < pop_limit_) {
+ int pop_limit_eff=max(1,int(v.promise*pop_limit_));
+ while(!cand.empty() && pops < pop_limit_eff) {
pop_heap(cand.begin(), cand.end(), HeapCandCompare());
Candidate* item = cand.back();
cand.pop_back();