summaryrefslogtreecommitdiff
path: root/decoder/incremental.h
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-22 11:35:31 -0400
committerKenneth Heafield <github@kheafield.com>2012-10-22 11:36:10 -0400
commit7278218f4581ed8da3dacbff9c7ff3834c292dab (patch)
treef343175050c24ba50cc8316d210f3fff52ff8323 /decoder/incremental.h
parent310e06dea1f4fd1eb1d3a8a80ee3ad57358188e1 (diff)
Remove global variable, have decoder hold a pointer
Diffstat (limited to 'decoder/incremental.h')
-rw-r--r--decoder/incremental.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/decoder/incremental.h b/decoder/incremental.h
index 180383ce..f791a626 100644
--- a/decoder/incremental.h
+++ b/decoder/incremental.h
@@ -6,6 +6,18 @@
class Hypergraph;
-void PassToIncremental(const char *model_file, const std::vector<weight_t> &weights, unsigned int pop_limit, const Hypergraph &hg);
+class IncrementalBase {
+ public:
+ static IncrementalBase *Load(const char *model_file, const std::vector<weight_t> &weights);
+
+ virtual ~IncrementalBase();
+
+ virtual void Search(unsigned int pop_limit, const Hypergraph &hg) const = 0;
+
+ protected:
+ IncrementalBase(const std::vector<weight_t> &weights);
+
+ const std::vector<weight_t> &cdec_weights_;
+};
#endif // _INCREMENTAL_H_