summaryrefslogtreecommitdiff
path: root/decoder/sampler.h
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-23 18:29:55 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-23 18:29:55 +0000
commit3f6de721b089823ac15f3d1ad786e6b479dee4d0 (patch)
tree98edfe38e297fddcbad2624384d174436f2001b4 /decoder/sampler.h
parent70ad159e22fc6ea12a5e7b468ab38a93c3ed111f (diff)
use centralized make
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@11 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/sampler.h')
-rw-r--r--decoder/sampler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/sampler.h b/decoder/sampler.h
index e5840f41..4d0b2e64 100644
--- a/decoder/sampler.h
+++ b/decoder/sampler.h
@@ -88,10 +88,12 @@ typedef RandomNumberGenerator<boost::mt19937> MT19937;
class SampleSet {
public:
const prob_t& operator[](int i) const { return m_scores[i]; }
+ prob_t& operator[](int i) { return m_scores[i]; }
bool empty() const { return m_scores.empty(); }
void add(const prob_t& s) { m_scores.push_back(s); }
void clear() { m_scores.clear(); }
size_t size() const { return m_scores.size(); }
+ void resize(int size) { m_scores.resize(size); }
std::vector<prob_t> m_scores;
};