summaryrefslogtreecommitdiff
path: root/vest
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 /vest
parent7fadd06330c015d7ebc51ebd50e30332d187acbb (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.cc6
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());