diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-21 22:09:50 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-21 22:09:50 +0000 |
commit | dd456888d9648ff8a79c0eee36c03a4dc5558b1c (patch) | |
tree | 76d74b02bf1f1fc5ec7a991c0ba08846390eeff9 /decoder/ff.h | |
parent | cd2264b189a732f9252492118af373f8c60e2f25 (diff) |
disabled TD reserved stuff - debug init assertion later
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@364 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff.h')
-rw-r--r-- | decoder/ff.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/decoder/ff.h b/decoder/ff.h index 2cf96d39..2b7c7fec 100644 --- a/decoder/ff.h +++ b/decoder/ff.h @@ -46,8 +46,8 @@ public: inline void TraversalFeatures(const SentenceMetadata& smeta, const Hypergraph::Edge& edge, const std::vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, + FeatureVector* features, + FeatureVector* estimated_features, void* out_state) const { TraversalFeaturesImpl(smeta, edge, ant_contexts, features, estimated_features, out_state); @@ -62,7 +62,7 @@ public: // it here. For example, the language model computes the cost of adding // <s> and </s>. virtual void FinalTraversalFeatures(const void* residual_state, - SparseVector<double>* final_features) const; + FeatureVector* final_features) const; protected: // context is a pointer to a buffer of size NumBytesContext() that the @@ -75,15 +75,15 @@ public: virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, const Hypergraph::Edge& edge, const std::vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, + FeatureVector* features, + FeatureVector* estimated_features, void* context) const = 0; // !!! ONLY call this from subclass *CONSTRUCTORS* !!! void SetStateSize(size_t state_size) { state_size_ = state_size; } - + int StateSize() const { return state_size_; } private: int state_size_; }; @@ -102,8 +102,8 @@ class WordPenalty : public FeatureFunction { virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, const Hypergraph::Edge& edge, const std::vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, + FeatureVector* features, + FeatureVector* estimated_features, void* context) const; private: const int fid_; @@ -122,8 +122,8 @@ class SourceWordPenalty : public FeatureFunction { virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, const Hypergraph::Edge& edge, const std::vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, + FeatureVector* features, + FeatureVector* estimated_features, void* context) const; private: const int fid_; @@ -148,8 +148,8 @@ class ArityPenalty : public FeatureFunction { virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, const Hypergraph::Edge& edge, const std::vector<const void*>& ant_contexts, - SparseVector<double>* features, - SparseVector<double>* estimated_features, + FeatureVector* features, + FeatureVector* estimated_features, void* context) const; private: std::vector<WordID> fids_; |