mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
33 lines
808 B
C++
33 lines
808 B
C++
#pragma once
|
|
|
|
#include <boost/unordered_set.hpp>
|
|
#include <boost/unordered_map.hpp>
|
|
#include <set>
|
|
#include "Bitmap.h"
|
|
#include "Util.h"
|
|
|
|
namespace Moses
|
|
{
|
|
|
|
class Bitmaps
|
|
{
|
|
typedef boost::unordered_map<WordsRange, const Bitmap*> NextBitmaps;
|
|
typedef boost::unordered_map<const Bitmap*, NextBitmaps, UnorderedComparer<Bitmap>, UnorderedComparer<Bitmap> > Coll;
|
|
//typedef std::set<const Bitmap*, OrderedComparer<Bitmap> > Coll;
|
|
Coll m_coll;
|
|
const Bitmap *m_initBitmap;
|
|
|
|
const Bitmap &GetNextBitmap(const Bitmap &bm, const WordsRange &range);
|
|
public:
|
|
Bitmaps(size_t inputSize, const std::vector<bool> &initSourceCompleted);
|
|
virtual ~Bitmaps();
|
|
|
|
const Bitmap &GetInitialBitmap() const {
|
|
return *m_initBitmap;
|
|
}
|
|
const Bitmap &GetBitmap(const Bitmap &bm, const WordsRange &range);
|
|
|
|
};
|
|
|
|
}
|