diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
commit | 6249432407af8730c10bccc7894c0725fcaf5e47 (patch) | |
tree | 3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /mert/OptimizerFactory.cpp | |
parent | 59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff) |
beautify
Diffstat (limited to 'mert/OptimizerFactory.cpp')
-rw-r--r-- | mert/OptimizerFactory.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/mert/OptimizerFactory.cpp b/mert/OptimizerFactory.cpp index b33194f33..97288f9a8 100644 --- a/mert/OptimizerFactory.cpp +++ b/mert/OptimizerFactory.cpp @@ -5,7 +5,7 @@ using namespace std; namespace MosesTuning { - + vector<string> OptimizerFactory::m_type_names; @@ -38,11 +38,11 @@ OptimizerFactory::OptimizerType OptimizerFactory::GetOptimizerType(const string& } Optimizer* OptimizerFactory::BuildOptimizer(unsigned dim, - const vector<unsigned>& i2o, - const std::vector<bool>& positive, - const vector<parameter_t>& start, - const string& type, - unsigned int nrandom) + const vector<unsigned>& i2o, + const std::vector<bool>& positive, + const vector<parameter_t>& start, + const string& type, + unsigned int nrandom) { OptimizerType opt_type = GetOptimizerType(type); if (opt_type == NOPTIMIZER) { @@ -55,18 +55,18 @@ Optimizer* OptimizerFactory::BuildOptimizer(unsigned dim, } switch (opt_type) { - case POWELL: - return new SimpleOptimizer(dim, i2o, positive, start, nrandom); - break; - case RANDOM_DIRECTION: - return new RandomDirectionOptimizer(dim, i2o, positive, start, nrandom); - break; - case RANDOM: - return new RandomOptimizer(dim, i2o, positive, start, nrandom); - break; - default: - cerr << "Error: unknown optimizer" << type << endl; - return NULL; + case POWELL: + return new SimpleOptimizer(dim, i2o, positive, start, nrandom); + break; + case RANDOM_DIRECTION: + return new RandomDirectionOptimizer(dim, i2o, positive, start, nrandom); + break; + case RANDOM: + return new RandomOptimizer(dim, i2o, positive, start, nrandom); + break; + default: + cerr << "Error: unknown optimizer" << type << endl; + return NULL; } } |