making dimensionality requirement optional
This commit is contained in:
parent
6f06d3349d
commit
948394e5b7
2 changed files with 3 additions and 3 deletions
|
|
@ -53,11 +53,11 @@ using namespace std;
|
||||||
|
|
||||||
namespace eo {
|
namespace eo {
|
||||||
|
|
||||||
CMAParams::CMAParams(eoParser& parser) {
|
CMAParams::CMAParams(eoParser& parser, bool requireDimensionality) {
|
||||||
|
|
||||||
string section = "CMA parameters";
|
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(
|
maxgen = parser.createParam(
|
||||||
1000,
|
1000,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class CMAParams {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CMAParams() { /* Call this and all values need to be set by hand */ }
|
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 */
|
void defaults(unsigned n_, unsigned maxgen_); /* apply all defaults using n and maxgen */
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue