summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vest/mr_vest_generate_mapper_input.cc11
-rw-r--r--vest/mr_vest_map.cc6
2 files changed, 14 insertions, 3 deletions
diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc
index e6cf3faa..68191a6a 100644
--- a/vest/mr_vest_generate_mapper_input.cc
+++ b/vest/mr_vest_generate_mapper_input.cc
@@ -85,8 +85,13 @@ struct oracle_directions {
void Print() {
for (int i = 0; i < dev_set_size; ++i)
- for (int j = 0; j < directions.size(); ++j)
- cout << forest_file(i) <<" " << i << ' ' << origin << ' ' << directions[j] << endl;
+ for (int j = 0; j < directions.size(); ++j) {
+ cout << forest_file(i) <<" " << i<<" ";
+ origin.print(cout,"=",";");
+ cout<<" ";
+ directions[j].print(cout,"=",";");
+ cout<<"\n";
+ }
}
void AddOptions(po::options_description *opts) {
@@ -117,7 +122,7 @@ struct oracle_directions {
po::store(parse_command_line(argc, argv, dcmdline_options), *conf);
po::notify(*conf);
if (conf->count("dev_set_size") == 0) {
- cerr << "Please specify the size of the development set using -d N\n";
+ cerr << "Please specify the size of the development set using -s N\n";
goto bad_cmdline;
}
if (conf->count("weights") == 0) {
diff --git a/vest/mr_vest_map.cc b/vest/mr_vest_map.cc
index 1506a99f..71dda6d7 100644
--- a/vest/mr_vest_map.cc
+++ b/vest/mr_vest_map.cc
@@ -43,6 +43,11 @@ void InitCommandLine(int argc, char** argv, po::variables_map* conf) {
}
bool ReadSparseVectorString(const string& s, SparseVector<double>* v) {
+#if 0
+ // this should work, but untested.
+ std::istringstream i(s);
+ i>>*v;
+#else
vector<string> fields;
Tokenize(s, ';', &fields);
if (fields.empty()) return false;
@@ -56,6 +61,7 @@ bool ReadSparseVectorString(const string& s, SparseVector<double>* v) {
v->set_value(FD::Convert(pair[0]), atof(pair[1].c_str()));
}
return true;
+#endif
}
int main(int argc, char** argv) {