diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-19 18:03:34 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-19 18:03:34 +0400 |
commit | b1da4dbe0e03ae85664ac5821d16760a25c615d9 (patch) | |
tree | 1481ad4807ffa4834c2860ae257900f96b64d9df /moses/Phrase.h | |
parent | cc707f76a9835be20f79b1d5a5e92796a10cef57 (diff) | |
parent | 7677832655bfa3cc19a932e716d78546491fa5fa (diff) |
merged
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r-- | moses/Phrase.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/moses/Phrase.h b/moses/Phrase.h index 588322147..d514a37ff 100644 --- a/moses/Phrase.h +++ b/moses/Phrase.h @@ -176,5 +176,21 @@ inline size_t hash_value(const Phrase& phrase) { return seed; } +struct PhrasePtrComparator { + inline bool operator()(const Phrase* lhs, const Phrase* rhs) const { + return *lhs == *rhs; + } +}; + +struct PhrasePtrHasher { + inline size_t operator()(const Phrase* phrase) const { + size_t seed = 0; + boost::hash_combine(seed,*phrase); + return seed; + } + +}; + } + #endif |