Use a constant instead of hard-coding.

This commit is contained in:
Tetsuo Kiso 2012-02-01 16:51:25 +09:00
parent 79fd25d0c4
commit 2a7d2a395f

View File

@ -35,6 +35,9 @@ const char kDefaultScorerFile[] = "statscore.data";
const char kDefaultFeatureFile[] = "features.data";
const char kDefaultInitFile[] = "init.opt";
// Used when saving optimized weights.
const char kOutputFile[] = "weights.txt";
/**
* Runs an optimisation, or a random restart.
*/
@ -470,7 +473,7 @@ int main(int argc, char **argv)
}
cerr << "Best point: " << finalP << " => " << final << endl;
ofstream res("weights.txt");
ofstream res(kOutputFile);
res << finalP << endl;
for (size_t i = 0; i < allTasks.size(); ++i) {