diff --git a/eo/src/es/eoSBXcross.h b/eo/src/es/eoSBXcross.h index 86ced64a..34fa4794 100644 --- a/eo/src/es/eoSBXcross.h +++ b/eo/src/es/eoSBXcross.h @@ -24,6 +24,7 @@ //----------------------------------------------------------------------------- #include // swap_ranges +#include #include #include #include @@ -63,6 +64,22 @@ template class eoSBXCrossover: public eoQuadOp /////////////////////////////////////////////// + ////////////////////////////////////////////// + + /** + * Constructor from a parser. Will read from the argument parser + * eoRealVectorBounds that contains the bounds + * eta, the SBX parameter + */ + + eoSBXCrossover(eoParser & _parser) : + // First, decide whether the objective variables are bounded + // Warning, must be the same keywords than other possible objectBounds elsewhere + bounds (_parser.getORcreateParam(eoDummyVectorNoBounds, "objectBounds", "Bounds for variables", 'B', "Variation Operators").value()) , + // then get eta value + eta (_parser.getORcreateParam(1.0, "eta", "SBX eta parameter", '\0', "Variation Operators").value()) , + range(1) {} + /// The class name. virtual std::string className() const { return "eoSBXCrossover"; }