diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 15:49:08 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-19 15:49:08 +0300 |
commit | db24036313717458c6995e087b1db1379867aab8 (patch) | |
tree | 15508ad2be39d354fe22430bbb85b78d1bc6f81b /moses/Bitmaps.h | |
parent | b9f216cc96fda35fad9983037f02100e611c55fc (diff) |
share bitmaps
Diffstat (limited to 'moses/Bitmaps.h')
-rw-r--r-- | moses/Bitmaps.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/moses/Bitmaps.h b/moses/Bitmaps.h index 798aac095..8db57a9c3 100644 --- a/moses/Bitmaps.h +++ b/moses/Bitmaps.h @@ -1,6 +1,7 @@ #pragma once #include <boost/unordered_set.hpp> +#include <set> #include "WordsBitmap.h" #include "Util.h" @@ -9,12 +10,19 @@ namespace Moses class Bitmaps { + typedef boost::unordered_set<WordsRange, const WordsBitmap*> NextBitmaps; typedef boost::unordered_set<const WordsBitmap*, UnorderedComparer<WordsBitmap>, UnorderedComparer<WordsBitmap> > Coll; + //typedef std::set<const WordsBitmap*, OrderedComparer<WordsBitmap> > Coll; Coll m_coll; - + const WordsBitmap *m_initBitmap; public: + Bitmaps(size_t inputSize); virtual ~Bitmaps(); + + const WordsBitmap &GetInitialBitmap() const + { return *m_initBitmap; } const WordsBitmap &GetBitmap(const WordsBitmap &bm); + const WordsBitmap &GetBitmap(const WordsBitmap &bm, const WordsRange &range); }; |