summaryrefslogtreecommitdiff
path: root/decoder/decoder.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-09-13 17:36:23 +0100
committerChris Dyer <cdyer@cs.cmu.edu>2011-09-13 17:36:23 +0100
commitbb86637332d49f71c485df34576e464eaf053656 (patch)
treeefaa1cb07db897f3443c9dc69712999a530921f3 /decoder/decoder.h
parent7fadd06330c015d7ebc51ebd50e30332d187acbb (diff)
get rid of bad Weights class so it no longer keeps a copy of a vector inside it
Diffstat (limited to 'decoder/decoder.h')
-rw-r--r--decoder/decoder.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/decoder/decoder.h b/decoder/decoder.h
index 5491369f..9d009ffa 100644
--- a/decoder/decoder.h
+++ b/decoder/decoder.h
@@ -7,6 +7,8 @@
#include <boost/shared_ptr.hpp>
#include <boost/program_options/variables_map.hpp>
+#include "weights.h" // weight_t
+
#undef CP_TIME
//#define CP_TIME
#ifdef CP_TIME
@@ -39,7 +41,12 @@ struct Decoder {
Decoder(int argc, char** argv);
Decoder(std::istream* config_file);
bool Decode(const std::string& input, DecoderObserver* observer = NULL);
- void SetWeights(const std::vector<double>& weights);
+
+ // access this to either *read* or *write* to the decoder's last
+ // weight vector (i.e., the weights of the finest past)
+ std::vector<weight_t>& CurrentWeightVector();
+ const std::vector<weight_t>& CurrentWeightVector() const;
+
void SetId(int id);
~Decoder();
const boost::program_options::variables_map& GetConf() const { return conf; }