minor compile errors in ChartKBestExtractor

This commit is contained in:
Hieu Hoang 2014-04-17 20:04:02 +01:00
parent d90aaf1018
commit a4d32a2b09
4 changed files with 15 additions and 4 deletions

View File

@ -166,6 +166,16 @@
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartHypothesisCollection.h</locationURI>
</link>
<link>
<name>ChartKBestExtractor.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.cpp</locationURI>
</link>
<link>
<name>ChartKBestExtractor.h</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.h</locationURI>
</link>
<link>
<name>ChartManager.cpp</name>
<type>1</type>

View File

@ -75,9 +75,6 @@ protected:
//! not implemented
ChartHypothesis(const ChartHypothesis &copy);
//! only used by ChartKBestExtractor
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
public:
#ifdef USE_HYPO_POOL
void *operator new(size_t /* num_bytes */) {
@ -96,6 +93,9 @@ public:
}
#endif
//! only used by ChartKBestExtractor
ChartHypothesis(const ChartHypothesis &, const ChartKBestExtractor &);
ChartHypothesis(const ChartTranslationOptions &, const RuleCubeItem &item,
ChartManager &manager);

View File

@ -73,7 +73,7 @@ void ChartKBestExtractor::Extract(
for (KBestVec::const_iterator p = top->kBestList.begin();
p != top->kBestList.end(); ++p) {
const Derivation &d = **p;
assert(d.edge->tail.size() == 1); // d should have exactly one predecessor.
assert(d.edge.tail.size() == 1); // d should have exactly one predecessor.
assert(d.backPointers.size() == 1);
std::size_t i = d.backPointers[0];
boost::shared_ptr<Derivation> pred = d.edge.tail[0]->kBestList[i];

View File

@ -19,6 +19,7 @@
#pragma once
#include <cassert>
#include "ChartHypothesis.h"
#include "ScoreComponentCollection.h"