mosesdecoder/contrib/other-builds/moses2/InputPaths.h

65 lines
1.0 KiB
C
Raw Normal View History

2015-10-24 01:19:31 +03:00
/*
* InputPaths.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#ifndef INPUTPATHS_H_
#define INPUTPATHS_H_
#include <vector>
#include "InputPath.h"
2015-11-17 18:58:35 +03:00
#include "MemPool.h"
2016-02-13 18:35:35 +03:00
#include "legacy/Matrix.h"
2015-10-24 01:19:31 +03:00
2015-12-10 23:49:30 +03:00
namespace Moses2
{
2015-11-03 17:20:10 +03:00
class PhraseImpl;
2015-10-26 00:20:55 +03:00
class System;
2015-10-24 01:19:31 +03:00
class InputPaths {
2016-01-13 20:18:40 +03:00
typedef std::vector<InputPath*> Coll;
2015-10-24 01:19:31 +03:00
public:
2015-10-24 05:32:30 +03:00
InputPaths() {}
2016-01-14 00:47:16 +03:00
void Init(const PhraseImpl &input, const Manager &mgr);
2015-10-24 01:19:31 +03:00
virtual ~InputPaths();
2015-10-24 15:14:35 +03:00
//! iterators
typedef Coll::iterator iterator;
typedef Coll::const_iterator const_iterator;
const_iterator begin() const {
return m_inputPaths.begin();
}
const_iterator end() const {
return m_inputPaths.end();
}
iterator begin() {
return m_inputPaths.begin();
}
iterator end() {
return m_inputPaths.end();
}
void DeleteUnusedPaths();
2015-12-16 16:31:19 +03:00
const InputPath &GetBlank() const
{ return *m_blank; }
2016-02-13 18:35:35 +03:00
const Matrix<InputPath*> &GetMatrix() const
{ return *m_matrix; }
2015-10-24 01:19:31 +03:00
protected:
2015-10-24 15:14:35 +03:00
Coll m_inputPaths;
2015-12-16 16:31:19 +03:00
InputPath *m_blank;
2016-02-13 18:35:35 +03:00
Matrix<InputPath*> *m_matrix;
2015-10-24 01:19:31 +03:00
};
2015-12-10 23:49:30 +03:00
}
2015-10-24 01:19:31 +03:00
#endif /* INPUTPATHS_H_ */