Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-08-09 21:16:31 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-08-09 21:16:31 +0400
commita867063a3bd0996c5e204f0e2639e3f983b5f78f (patch)
tree9e13d62777d0609d693085ac4047b7f2f166af58 /moses/ChartTranslationOptions.h
parent4db9aa2973bee8e8785ba0bb9517bbb1d66ac297 (diff)
convert to using shared pointers in ChartTranslationOptions
Diffstat (limited to 'moses/ChartTranslationOptions.h')
-rw-r--r--moses/ChartTranslationOptions.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/moses/ChartTranslationOptions.h b/moses/ChartTranslationOptions.h
index 110d00d24..d7d5002d5 100644
--- a/moses/ChartTranslationOptions.h
+++ b/moses/ChartTranslationOptions.h
@@ -26,6 +26,7 @@
#include "util/check.hh"
#include <vector>
+#include <boost/shared_ptr.hpp>
namespace Moses
{
@@ -36,6 +37,8 @@ namespace Moses
class ChartTranslationOptions
{
public:
+ typedef std::vector<boost::shared_ptr<TargetPhrase> > CollType;
+
/** Constructor
\param targetPhraseColl @todo dunno
\param stackVec @todo dunno
@@ -57,7 +60,7 @@ public:
}
//! @todo isn't the translation suppose to just contain 1 target phrase, not a whole collection of them?
- const std::vector<const TargetPhrase*> &GetTargetPhrases() const {
+ const CollType &GetTargetPhrases() const {
return m_targetPhraseCollection;
}
@@ -77,7 +80,8 @@ public:
private:
StackVec m_stackVec; //! vector of hypothesis list!
- std::vector<const TargetPhrase*> m_targetPhraseCollection;
+ CollType m_targetPhraseCollection;
+
const WordsRange *m_wordsRange;
float m_estimateOfBestScore;
};