mosesdecoder/moses/LMList.h
2013-05-11 13:23:50 +01:00

48 lines
726 B
C++

#ifndef moses_LMList_h
#define moses_LMList_h
#include <list>
#include "LM/Base.h"
namespace Moses
{
class Phrase;
class ScoreColl;
class ScoreComponentCollection;
//! List of language models and function to calc scores from each LM, given a phrase
class LMList
{
protected:
typedef std::list < LanguageModel* > CollType;
CollType m_coll;
public:
typedef CollType::iterator iterator;
typedef CollType::const_iterator const_iterator;
//! iterators
const_iterator begin() const {
return m_coll.begin();
}
const_iterator end() const {
return m_coll.end();
}
size_t size() const {
return m_coll.size();
}
LMList()
{}
void Add(LanguageModel *lm) {
m_coll.push_back(lm);
}
};
}
#endif