From 0e9d2eb31f358089648b22b3976185d35206d006 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 11 Jan 2017 16:07:14 +0800 Subject: fixes typos --- src/lookup/phonetic_lookup_heap.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/lookup/phonetic_lookup_heap.h b/src/lookup/phonetic_lookup_heap.h index dd2dab3..bc432a9 100644 --- a/src/lookup/phonetic_lookup_heap.h +++ b/src/lookup/phonetic_lookup_heap.h @@ -21,7 +21,7 @@ #ifndef PHONETIC_LOOKUP_HEAP_H #define PHONETIC_LOOKUP_HEAP_H -static inline bool trellis_value_less_than(const trellis_value_t &lhs, +static inline bool trellis_value_more_than(const trellis_value_t &lhs, const trellis_value_t &rhs) { /* min heap here */ return lhs.m_poss > rhs.m_poss; @@ -52,7 +52,7 @@ public: if (m_nelem < nbest) { m_elements[m_nelem] = *item; m_nelem ++; - push_heap(begin(), end(), trellis_value_less_than); + push_heap(begin(), end(), trellis_value_more_than); return true; } @@ -61,9 +61,9 @@ public: /* compare new item */ if (item->m_poss > min->m_poss) { - pop_heap(begin(), end(), trellis_value_less_than); + pop_heap(begin(), end(), trellis_value_more_than); m_elements[m_nelem - 1] = *item; - push_heap(begin(), end(), trellis_value_less_than); + push_heap(begin(), end(), trellis_value_more_than); return true; } @@ -101,7 +101,7 @@ public: }; -static inline bool matrix_value_less_than(const matrix_value_t &lhs, +static inline bool matrix_value_more_than(const matrix_value_t &lhs, const matrix_value_t &rhs) { /* min heap here */ return lhs.m_poss > rhs.m_poss; @@ -132,7 +132,7 @@ public: if (m_nelem < nbest) { m_elements[m_nelem] = *item; m_nelem ++; - push_heap(begin(), end(), trellis_value_less_than); + push_heap(begin(), end(), matrix_value_more_than); return true; } @@ -141,9 +141,9 @@ public: /* compare new item */ if (item->m_poss > min->m_poss) { - pop_heap(begin(), end(), trellis_value_less_than); + pop_heap(begin(), end(), matrix_value_more_than); m_elements[m_nelem - 1] = *item; - push_heap(begin(), end(), trellis_value_less_than); + push_heap(begin(), end(), matrix_value_more_than); return true; } -- cgit