summaryrefslogtreecommitdiffstats
path: root/src/lookup
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-01-11 16:07:14 +0800
committerPeng Wu <alexepico@gmail.com>2017-01-11 16:07:14 +0800
commit0e9d2eb31f358089648b22b3976185d35206d006 (patch)
tree5f34b6c3c9e5d166a9acf9cf38d7c4dd84107db8 /src/lookup
parent3d694bdadbfeef1c2c182c96643c3ee6ba0e5dc7 (diff)
downloadlibpinyin-0e9d2eb31f358089648b22b3976185d35206d006.tar.gz
libpinyin-0e9d2eb31f358089648b22b3976185d35206d006.tar.xz
libpinyin-0e9d2eb31f358089648b22b3976185d35206d006.zip
fixes typos
Diffstat (limited to 'src/lookup')
-rw-r--r--src/lookup/phonetic_lookup_heap.h16
1 files changed, 8 insertions, 8 deletions
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;
}