From 2e6ef7cbec77b22ce3d64416a5ada3a6c081f9e2 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 9 Sep 2011 09:51:09 +0200 Subject: forgotten files --- dtrain/sample_hg.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dtrain/sample_hg.h (limited to 'dtrain/sample_hg.h') diff --git a/dtrain/sample_hg.h b/dtrain/sample_hg.h new file mode 100644 index 00000000..932fd369 --- /dev/null +++ b/dtrain/sample_hg.h @@ -0,0 +1,24 @@ +#ifndef _SAMPLE_HG_H_ +#define _SAMPLE_HG_H_ + +#include +#include "sparse_vector.h" +#include "sampler.h" +#include "wordid.h" + +class Hypergraph; + +struct HypergraphSampler { + struct Hypothesis { + std::vector words; + SparseVector fmap; + prob_t model_score; + }; + + static void sample_hypotheses(const Hypergraph& hg, + unsigned n, + MT19937* rng, + std::vector* hypos); +}; + +#endif -- cgit v1.2.3