diff options
author | Peng Wu <alexepico@gmail.com> | 2017-01-17 16:57:15 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-01-17 16:57:15 +0800 |
commit | acdefd9af9188ba0de901ca3d3670850d989ced4 (patch) | |
tree | fbf992f6802e830cd8798f8b30f5df8b0d4b9b6b /src/lookup/phonetic_lookup_linear.h | |
parent | 53948ad9daa5efd0da6e2e01f8e0e4545283fc1e (diff) | |
download | libpinyin-acdefd9af9188ba0de901ca3d3670850d989ced4.tar.gz libpinyin-acdefd9af9188ba0de901ca3d3670850d989ced4.tar.xz libpinyin-acdefd9af9188ba0de901ca3d3670850d989ced4.zip |
write class ForwardPhoneticTrellis in progress
Diffstat (limited to 'src/lookup/phonetic_lookup_linear.h')
-rw-r--r-- | src/lookup/phonetic_lookup_linear.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lookup/phonetic_lookup_linear.h b/src/lookup/phonetic_lookup_linear.h index fadc2bc..7abca66 100644 --- a/src/lookup/phonetic_lookup_linear.h +++ b/src/lookup/phonetic_lookup_linear.h @@ -38,6 +38,11 @@ public: const trellis_value_t * begin() { return m_elements; } const trellis_value_t * end() { return m_elements + m_nelem; } + bool number() { + for (ssize_t i = 0; i < m_nelem; ++i) + m_elements[i].m_current_index = i; + } + /* return true if the item is stored into m_elements. */ bool eval_item(const trellis_value_t * item) { /* still have space */ |