From 3607e00fec971d2a58a638ade53870aac0d31208 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 29 Apr 2012 14:55:27 +0200 Subject: added params, output --- dtrain/ksampler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dtrain/ksampler.h') diff --git a/dtrain/ksampler.h b/dtrain/ksampler.h index 0783f98b..f52fb649 100644 --- a/dtrain/ksampler.h +++ b/dtrain/ksampler.h @@ -30,7 +30,7 @@ struct KSampler : public HypSampler vector* GetSamples() { return &s_; } void ScoredSamples(const Hypergraph& forest) { - s_.clear(); + s_.clear(); sz_ = f_count_ = 0; std::vector samples; HypergraphSampler::sample_hypotheses(forest, k_, prng_, &samples); for (unsigned i = 0; i < k_; ++i) { @@ -41,6 +41,8 @@ struct KSampler : public HypSampler h.rank = i; h.score = scorer_->Score(h.w, *ref_, i, src_len_); s_.push_back(h); + sz_++; + f_count_ += h.f.size(); } } }; -- cgit v1.2.3