From 0ef9ee63a44bf2659756eb2f1d34f5fddfb458a4 Mon Sep 17 00:00:00 2001 From: redpony Date: Wed, 25 Aug 2010 02:14:41 +0000 Subject: crp with explicit table tracking git-svn-id: https://ws10smt.googlecode.com/svn/trunk@618 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cdec.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'decoder') diff --git a/decoder/cdec.cc b/decoder/cdec.cc index ca6284f6..f7b06aa4 100644 --- a/decoder/cdec.cc +++ b/decoder/cdec.cc @@ -266,8 +266,8 @@ void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* c } // TODO move out of cdec into some sampling decoder file -void SampleRecurse(const Hypergraph& hg, const vector& ss, int n, vector* out) { - const SampleSet& s = ss[n]; +void SampleRecurse(const Hypergraph& hg, const vector >& ss, int n, vector* out) { + const SampleSet& s = ss[n]; int i = rng->SelectSample(s); const Hypergraph::Edge& edge = hg.edges_[hg.nodes_[n].in_edges_[i]]; vector > ants(edge.tail_nodes_.size()); @@ -290,9 +290,9 @@ void MaxTranslationSample(Hypergraph* hg, const int samples, const int k) { unordered_map > m; hg->PushWeightsToGoal(); const int num_nodes = hg->nodes_.size(); - vector ss(num_nodes); + vector > ss(num_nodes); for (int i = 0; i < num_nodes; ++i) { - SampleSet& s = ss[i]; + SampleSet& s = ss[i]; const vector& in_edges = hg->nodes_[i].in_edges_; for (int j = 0; j < in_edges.size(); ++j) { s.add(hg->edges_[in_edges[j]].edge_prob_); -- cgit v1.2.3