diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-13 17:36:23 +0100 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-09-13 17:36:23 +0100 |
commit | 251da4347ea356f799e6c227ac8cf541c0cef2f2 (patch) | |
tree | 407e647e34aa89049754d83e9e1eb2cddff05de8 /vest | |
parent | 75bff8e374f3cdcf3dc141f8b7b37858d0611234 (diff) |
get rid of bad Weights class so it no longer keeps a copy of a vector inside it
Diffstat (limited to 'vest')
-rw-r--r-- | vest/mr_vest_generate_mapper_input.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc index b84c44bc..0c094fd5 100644 --- a/vest/mr_vest_generate_mapper_input.cc +++ b/vest/mr_vest_generate_mapper_input.cc @@ -223,16 +223,16 @@ struct oracle_directions { cerr << "Forest repo: " << forest_repository << endl; assert(DirectoryExists(forest_repository)); vector<string> features; - weights.InitFromFile(weights_file, &features); + vector<weight_t> dorigin; + Weights::InitFromFile(weights_file, &dorigin, &features); if (optimize_features.size()) features=optimize_features; - weights.InitSparseVector(&origin); + Weights::InitSparseVector(dorigin, &origin); fids.clear(); AddFeatureIds(features); oracles.resize(dev_set_size); } - Weights weights; void AddFeatureIds(vector<string> const& features) { int i = fids.size(); fids.resize(fids.size()+features.size()); |