diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-01-25 22:30:48 +0200 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-01-25 22:30:48 +0200 |
commit | c4ade3091b812ca135ae6520fa7173e1bbf28754 (patch) | |
tree | 2528af208f6dafd0c27dcbec0d2da291a9c93ca2 /klm/util/key_value_packing.hh | |
parent | d04c0ca2d9df0e147239b18e90650ca8bd51d594 (diff) |
update kenlm
Diffstat (limited to 'klm/util/key_value_packing.hh')
-rw-r--r-- | klm/util/key_value_packing.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/klm/util/key_value_packing.hh b/klm/util/key_value_packing.hh index 450512ac..b84a5aad 100644 --- a/klm/util/key_value_packing.hh +++ b/klm/util/key_value_packing.hh @@ -18,6 +18,8 @@ template <class Key, class Value> struct Entry { const Key &GetKey() const { return key; } const Value &GetValue() const { return value; } + Value &MutableValue() { return value; } + void Set(const Key &key_in, const Value &value_in) { SetKey(key_in); SetValue(value_in); @@ -77,6 +79,8 @@ template <class KeyT, class ValueT> class ByteAlignedPacking { const Key &GetKey() const { return key; } const Value &GetValue() const { return value; } + Value &MutableValue() { return value; } + void Set(const Key &key_in, const Value &value_in) { SetKey(key_in); SetValue(value_in); |