2015-10-18 03:02:38 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <boost/unordered_set.hpp>
|
2015-10-19 15:49:08 +03:00
|
|
|
#include <set>
|
2015-10-18 03:02:38 +03:00
|
|
|
#include "WordsBitmap.h"
|
|
|
|
#include "Util.h"
|
|
|
|
|
2015-10-18 03:19:35 +03:00
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
2015-10-18 03:02:38 +03:00
|
|
|
class Bitmaps
|
|
|
|
{
|
2015-10-19 19:22:48 +03:00
|
|
|
typedef boost::unordered_set<WordsRange, const WordsBitmap*> NextBitmaps;
|
|
|
|
typedef boost::unordered_set<const WordsBitmap*, UnorderedComparer<WordsBitmap>, UnorderedComparer<WordsBitmap> > Coll;
|
2015-10-19 15:49:08 +03:00
|
|
|
//typedef std::set<const WordsBitmap*, OrderedComparer<WordsBitmap> > Coll;
|
2015-10-18 15:30:02 +03:00
|
|
|
Coll m_coll;
|
2015-10-19 15:49:08 +03:00
|
|
|
const WordsBitmap *m_initBitmap;
|
2015-10-18 03:02:38 +03:00
|
|
|
public:
|
2015-10-19 15:49:08 +03:00
|
|
|
Bitmaps(size_t inputSize);
|
2015-10-18 15:30:02 +03:00
|
|
|
virtual ~Bitmaps();
|
2015-10-19 15:49:08 +03:00
|
|
|
|
|
|
|
const WordsBitmap &GetInitialBitmap() const
|
|
|
|
{ return *m_initBitmap; }
|
2015-10-19 19:22:48 +03:00
|
|
|
const WordsBitmap &GetBitmap(const WordsBitmap &bm);
|
2015-10-19 15:49:08 +03:00
|
|
|
const WordsBitmap &GetBitmap(const WordsBitmap &bm, const WordsRange &range);
|
2015-10-18 03:02:38 +03:00
|
|
|
|
|
|
|
};
|
2015-10-18 03:19:35 +03:00
|
|
|
|
|
|
|
}
|