summaryrefslogtreecommitdiff
path: root/dtrain/hgsampler.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-09-23 22:02:45 +0200
committerPatrick Simianer <p@simianer.de>2011-09-23 22:02:45 +0200
commite8f1795f6aa14ca4a936d675d446894f5c721190 (patch)
tree9747dd7386c54f0803734331d2772181b66de983 /dtrain/hgsampler.h
parent9bde56ed23b4b97f8193f9f8f582f18086ff17c1 (diff)
more renaming, random pair sampler uses boost rng
Diffstat (limited to 'dtrain/hgsampler.h')
-rw-r--r--dtrain/hgsampler.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/dtrain/hgsampler.h b/dtrain/hgsampler.h
new file mode 100644
index 00000000..b840c07f
--- /dev/null
+++ b/dtrain/hgsampler.h
@@ -0,0 +1,29 @@
+#ifndef _DTRAIN_HGSAMPLER_H_
+#define _DTRAIN_HGSAMPLER_H_
+
+
+#include <vector>
+#include "sparse_vector.h"
+#include "sampler.h"
+#include "wordid.h"
+
+class Hypergraph;
+
+struct HypergraphSampler {
+
+ struct Hypothesis {
+ std::vector<WordID> words;
+ SparseVector<double> fmap;
+ prob_t model_score;
+ };
+
+ static void
+ sample_hypotheses(const Hypergraph& hg,
+ unsigned n,
+ MT19937* rng,
+ std::vector<Hypothesis>* hypos);
+};
+
+
+#endif
+