diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-12-12 00:03:30 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-12-12 00:03:30 +0400 |
commit | bc9ce334d0e432e210cc57c2a99e20e53e62f52e (patch) | |
tree | f73b7837d5e4bb8bc8a95cc475c02aa27638d232 /moses/RuleCube.cpp | |
parent | fb356606e9c0177a2618d036296424cd2783395b (diff) |
more debug functions
Diffstat (limited to 'moses/RuleCube.cpp')
-rw-r--r-- | moses/RuleCube.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/moses/RuleCube.cpp b/moses/RuleCube.cpp index 83e7d0278..6732eebf5 100644 --- a/moses/RuleCube.cpp +++ b/moses/RuleCube.cpp @@ -30,8 +30,11 @@ #include <boost/functional/hash.hpp> +using namespace std; + namespace Moses { +extern bool g_mosesDebug; // initialise the RuleCube by creating the top-left corner item RuleCube::RuleCube(const ChartTranslationOptions &transOpt, @@ -39,6 +42,10 @@ RuleCube::RuleCube(const ChartTranslationOptions &transOpt, ChartManager &manager) : m_transOpt(transOpt) { + if (g_mosesDebug) { + cerr << transOpt.GetSize() << endl; + } + RuleCubeItem *item = new RuleCubeItem(transOpt, allChartCells); m_covered.insert(item); if (StaticData::Instance().GetCubePruningLazyScoring()) { @@ -98,4 +105,9 @@ void RuleCube::CreateNeighbor(const RuleCubeItem &item, int dimensionIndex, } } +std::ostream& operator<<(std::ostream &out, const RuleCube &obj) +{ + out << obj.GetItemSetSize(); + return out; +} } |