Class RepairDoubleSolutionWithOppositeBoundValue
java.lang.Object
org.uma.jmetal.solution.doublesolution.repairsolution.impl.RepairDoubleSolutionWithOppositeBoundValue
- All Implemented Interfaces:
Serializable,RepairDoubleSolution
public class RepairDoubleSolutionWithOppositeBoundValue
extends Object
implements RepairDoubleSolution
- Version:
- 1.0
- Author:
- Antonio J. Nebro
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublerepairSolutionVariableValue(double value, double lowerBound, double upperBound) Checks if the value is between its bounds; if not, if it lower/higher than the lower/upper bound, the upper/lower bound value is returned
-
Constructor Details
-
RepairDoubleSolutionWithOppositeBoundValue
public RepairDoubleSolutionWithOppositeBoundValue()
-
-
Method Details
-
repairSolutionVariableValue
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) Checks if the value is between its bounds; if not, if it lower/higher than the lower/upper bound, the upper/lower bound value is returned- Specified by:
repairSolutionVariableValuein interfaceRepairDoubleSolution- Parameters:
value- The value to be checkedlowerBound-upperBound-- Returns:
- The same value if it is in the limits or a repaired value otherwise
-