making dimensionality requirement optional

This commit is contained in:
maartenkeijzer 2006-03-06 20:31:03 +00:00
commit 948394e5b7
2 changed files with 3 additions and 3 deletions

View file

@ -53,11 +53,11 @@ using namespace std;
namespace eo {
CMAParams::CMAParams(eoParser& parser) {
CMAParams::CMAParams(eoParser& parser, bool requireDimensionality) {
string section = "CMA parameters";
n = parser.createParam(0, "dimensionality", "Dimensionality (N) of the problem", 'N', section, true).value();
n = parser.createParam(0, "dimensionality", "Dimensionality (N) of the problem", 'N', section, requireDimensionality).value();
maxgen = parser.createParam(
1000,

View file

@ -22,7 +22,7 @@ class CMAParams {
public:
CMAParams() { /* Call this and all values need to be set by hand */ }
CMAParams(eoParser& parser);
CMAParams(eoParser& parser, bool requireDimensionality = true);
void defaults(unsigned n_, unsigned maxgen_); /* apply all defaults using n and maxgen */