mosesdecoder/contrib/other-builds/moses2/Search/Manager.h
2015-11-09 13:54:53 +00:00

70 lines
1.3 KiB
C++

/*
* Manager.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#pragma once
#include <queue>
#include <cstddef>
#include <string>
#include "../InputPaths.h"
#include "../TargetPhrase.h"
#include "../MemPool.h"
#include "../Recycler.h"
#include "Stacks.h"
#include "moses/Bitmaps.h"
#include "moses/SquareMatrix.h"
class System;
class PhraseImpl;
class SearchNormal;
class Manager {
public:
const System &system;
Manager(System &system, const std::string &inputStr);
virtual ~Manager();
MemPool &GetPool() const
{ return *m_pool; }
Recycler<Hypothesis*> &GetHypoRecycle() const
{ return *m_hypoRecycle; }
Moses::Bitmaps &GetBitmaps()
{ return *m_bitmaps; }
const PhraseImpl &GetInput() const
{ return *m_input; }
const Moses::SquareMatrix &GetEstimatedScores() const
{ return *m_estimatedScores; }
const InputPaths &GetInputPaths() const
{ return m_inputPaths; }
const Hypothesis *GetBestHypothesis() const;
void Decode();
protected:
mutable MemPool *m_pool;
mutable Recycler<Hypothesis*> *m_hypoRecycle;
PhraseImpl *m_input;
InputPaths m_inputPaths;
Moses::Bitmaps *m_bitmaps;
Moses::SquareMatrix *m_estimatedScores;
Moses::Range m_initRange;
TargetPhrase m_initPhrase;
Stacks m_stacks;
SearchNormal *m_search;
void CalcFutureScore();
};