diff options
author | tosch <tosch@linux-hs3m.site> | 2012-03-30 13:50:23 +0400 |
---|---|---|
committer | tosch <tosch@linux-hs3m.site> | 2012-03-30 13:50:23 +0400 |
commit | fab03f5a6e34e23f69063e0f6766c59cfbeebcd1 (patch) | |
tree | feb7f4ec185df8bb419a8b97d25cb16a58774174 /mert/OptimizerFactory.cpp | |
parent | 292c75cb1ac8d92dcb56cf04821440e7974e6f09 (diff) |
added an (optional) positivity constraint to MERT
Diffstat (limited to 'mert/OptimizerFactory.cpp')
-rw-r--r-- | mert/OptimizerFactory.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mert/OptimizerFactory.cpp b/mert/OptimizerFactory.cpp index 06b50d20b..e6adc13d4 100644 --- a/mert/OptimizerFactory.cpp +++ b/mert/OptimizerFactory.cpp @@ -35,6 +35,7 @@ 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) @@ -51,13 +52,13 @@ Optimizer* OptimizerFactory::BuildOptimizer(unsigned dim, switch (opt_type) { case POWELL: - return new SimpleOptimizer(dim, i2o, start, nrandom); + return new SimpleOptimizer(dim, i2o, positive, start, nrandom); break; case RANDOM_DIRECTION: - return new RandomDirectionOptimizer(dim, i2o, start, nrandom); + return new RandomDirectionOptimizer(dim, i2o, positive, start, nrandom); break; case RANDOM: - return new RandomOptimizer(dim, i2o, start, nrandom); + return new RandomOptimizer(dim, i2o, positive, start, nrandom); break; default: cerr << "Error: unknown optimizer" << type << endl; |