diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-25 19:32:34 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-25 19:32:34 +0000 |
commit | fe91371a77ec43cc08d284ac49f00af8baa1a298 (patch) | |
tree | 0cad767686d6522d10c288d274dd358bd054ee65 /decoder/small_vector.h | |
parent | 410cc38baef914cdc0841a2e8d5a84098e48be49 (diff) |
fixed CreateViterbiHypergraph (old impl did not work), so --show_derivation works
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@408 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/small_vector.h')
-rw-r--r-- | decoder/small_vector.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/small_vector.h b/decoder/small_vector.h index 7ed99e77..25c52359 100644 --- a/decoder/small_vector.h +++ b/decoder/small_vector.h @@ -25,12 +25,15 @@ class SmallVector { typedef T const* const_iterator; typedef T* iterator; + typedef T value_type; + typedef T &reference; + typedef T const& const_reference; + T *begin() { return size_>SV_MAX?data_.ptr:data_.vals; } T const* begin() const { return const_cast<Self*>(this)->begin(); } T *end() { return begin()+size_; } T const* end() const { return begin()+size_; } - explicit SmallVector(size_t s) : size_(s) { assert(s < 0xA000); if (s <= SV_MAX) { |