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 <hieuhoang@gmail.com>2015-10-19 12:58:29 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-19 13:48:27 +0300
commitb9f216cc96fda35fad9983037f02100e611c55fc (patch)
tree473c6cb6cca70f385bbb0edc9eeb380c988508bb /moses/Hypothesis.h
parentf7839c42d5cf2de17e86ec16df5e2f541ba53c75 (diff)
delete use of mempool in Hypos. Never used. Getting in the way of next refactoring
Diffstat (limited to 'moses/Hypothesis.h')
-rw-r--r--moses/Hypothesis.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/moses/Hypothesis.h b/moses/Hypothesis.h
index caff9b397..221f07b1e 100644
--- a/moses/Hypothesis.h
+++ b/moses/Hypothesis.h
@@ -71,13 +71,8 @@ class Hypothesis
friend std::ostream& operator<<(std::ostream&, const Hypothesis&);
protected:
- static ObjectPool<Hypothesis> s_objectPool;
-
const Hypothesis* m_prevHypo; /*! backpointer to previous hypothesis (from which this one was created) */
-// const Phrase &m_targetPhrase; /*! target phrase being created at the current decoding step */
WordsBitmap m_sourceCompleted; /*! keeps track of which words have been translated so far */
- //TODO: how to integrate this into confusion network framework; what if
- //it's a confusion network in the end???
InputType const& m_sourceInput;
WordsRange m_currSourceWordsRange; /*! source word positions of the last phrase that was used to create this hypothesis */
WordsRange m_currTargetWordsRange; /*! target word positions of the last phrase that was used to create this hypothesis */
@@ -95,29 +90,13 @@ protected:
int m_id; /*! numeric ID of this hypothesis, used for logging */
+public:
/*! used by initial seeding of the translation process */
Hypothesis(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt);
/*! used when creating a new hypothesis using a translation option (phrase translation) */
Hypothesis(const Hypothesis &prevHypo, const TranslationOption &transOpt);
-
-public:
- static ObjectPool<Hypothesis> &GetObjectPool() {
- return s_objectPool;
- }
-
~Hypothesis();
- /** return the subclass of Hypothesis most appropriate to the given translation option */
- static Hypothesis* Create(const Hypothesis &prevHypo, const TranslationOption &transOpt);
-
- static Hypothesis* Create(Manager& manager, const WordsBitmap &initialCoverage);
-
- /** return the subclass of Hypothesis most appropriate to the given target phrase */
- static Hypothesis* Create(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt);
-
- /** return the subclass of Hypothesis most appropriate to the given translation option */
- Hypothesis* CreateNext(const TranslationOption &transOpt) const;
-
void PrintHypothesis() const;
const InputType& GetInput() const {
@@ -307,17 +286,5 @@ struct CompareHypothesisTotalScore {
}
};
-#ifdef USE_HYPO_POOL
-
-#define FREEHYPO(hypo) \
-{ \
- ObjectPool<Hypothesis> &pool = Hypothesis::GetObjectPool(); \
- pool.freeObject(hypo); \
-} \
-
-#else
-#define FREEHYPO(hypo) delete hypo
-#endif
-
}
#endif