diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 19:42:14 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 19:42:14 +0300 |
commit | 411d0ae0032af1672311b79289d4aeabb68b6dcb (patch) | |
tree | 25b3d87c162c5d34a2e05f5c1ad385edd3408fb3 /moses/Util.h | |
parent | dd7bf06f957957fad6871c33382ebf98a75ea55d (diff) |
use booost::unordered_map to store bitmap containers
Diffstat (limited to 'moses/Util.h')
-rw-r--r-- | moses/Util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/moses/Util.h b/moses/Util.h index cc0f7314b..a642ba2b5 100644 --- a/moses/Util.h +++ b/moses/Util.h @@ -541,6 +541,14 @@ template<typename T> class UnorderedComparer { public: + size_t operator()(const T& obj) const { + return obj.hash(); + } + + bool operator()(const T& a, const T& b) const { + return a == b; + } + size_t operator()(const T* obj) const { return obj->hash(); } |