Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-10-19 19:42:14 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-19 19:42:14 +0300
commit411d0ae0032af1672311b79289d4aeabb68b6dcb (patch)
tree25b3d87c162c5d34a2e05f5c1ad385edd3408fb3 /moses/Util.h
parentdd7bf06f957957fad6871c33382ebf98a75ea55d (diff)
use booost::unordered_map to store bitmap containers
Diffstat (limited to 'moses/Util.h')
-rw-r--r--moses/Util.h8
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();
}