diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 15:25:53 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 15:25:53 +0300 |
commit | 7a2d372df6d04b16a860f6aada5514b884544ed3 (patch) | |
tree | fe986cf1704498319c16d5a0d7dd97445afb9af6 /moses/Phrase.h | |
parent | 7e5fef7794512c6eb5d1969ce47b135e9a087b08 (diff) | |
parent | b7d947ebf69ea04c8cf4092f23a8689fd0f37b0e (diff) |
merge
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r-- | moses/Phrase.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/moses/Phrase.h b/moses/Phrase.h index c200a3718..18726d93a 100644 --- a/moses/Phrase.h +++ b/moses/Phrase.h @@ -192,6 +192,8 @@ public: return Compare(compare) < 0; } + size_t hash() const; + bool operator==(const Phrase &compare) const; bool operator!=(const Phrase &compare) const { return ! (*this == compare); @@ -203,11 +205,7 @@ public: inline size_t hash_value(const Phrase& phrase) { - size_t seed = 0; - for (size_t i = 0; i < phrase.GetSize(); ++i) { - boost::hash_combine(seed, phrase.GetWord(i)); - } - return seed; + return phrase.hash(); } struct PhrasePtrComparator { |