2016-03-01 22:57:40 +03:00
|
|
|
/*
|
|
|
|
* InputPath.h
|
|
|
|
*
|
|
|
|
* Created on: 23 Oct 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
|
|
|
#include "../InputPathBase.h"
|
|
|
|
|
|
|
|
namespace Moses2
|
|
|
|
{
|
|
|
|
namespace SCFG
|
|
|
|
{
|
2016-04-15 15:57:46 +03:00
|
|
|
class TargetPhrases;
|
|
|
|
|
2016-03-03 16:04:27 +03:00
|
|
|
class ActiveChartEntry
|
2016-03-01 22:57:40 +03:00
|
|
|
{
|
|
|
|
public:
|
2016-03-31 23:00:16 +03:00
|
|
|
const void *data;
|
2016-03-03 16:04:27 +03:00
|
|
|
|
2016-03-31 23:00:16 +03:00
|
|
|
ActiveChartEntry(const void *vdata) :
|
|
|
|
data(vdata)
|
|
|
|
{
|
|
|
|
}
|
2016-03-01 22:57:40 +03:00
|
|
|
};
|
|
|
|
|
2016-03-03 16:04:27 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
class ActiveChart
|
2016-03-01 22:57:40 +03:00
|
|
|
{
|
|
|
|
public:
|
2016-03-31 23:00:16 +03:00
|
|
|
std::vector<ActiveChartEntry*> entries;
|
2016-03-01 22:57:40 +03:00
|
|
|
};
|
|
|
|
|
2016-03-03 16:04:27 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////////
|
2016-03-31 23:00:16 +03:00
|
|
|
class InputPath: public InputPathBase
|
2016-03-01 22:57:40 +03:00
|
|
|
{
|
2016-03-31 23:00:16 +03:00
|
|
|
friend std::ostream& operator<<(std::ostream &, const InputPath &);
|
2016-03-01 22:57:40 +03:00
|
|
|
public:
|
2016-04-15 22:33:17 +03:00
|
|
|
SCFG::TargetPhrases* targetPhrases;
|
2016-04-15 15:38:01 +03:00
|
|
|
|
2016-03-31 23:00:16 +03:00
|
|
|
InputPath(MemPool &pool, const SubPhrase &subPhrase, const Range &range,
|
|
|
|
size_t numPt, const InputPath *prefixPath);
|
|
|
|
virtual ~InputPath();
|
2016-03-01 22:57:40 +03:00
|
|
|
|
2016-03-31 23:00:16 +03:00
|
|
|
ActiveChart &GetActiveChart(size_t ptInd)
|
|
|
|
{
|
|
|
|
return m_activeChart[ptInd];
|
|
|
|
}
|
2016-03-01 22:57:40 +03:00
|
|
|
|
|
|
|
protected:
|
2016-03-31 23:00:16 +03:00
|
|
|
ActiveChart *m_activeChart;
|
2016-03-01 22:57:40 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|