Class RepairDoubleSolutionWithRandomValue
java.lang.Object
org.uma.jmetal.solution.doublesolution.repairsolution.impl.RepairDoubleSolutionWithRandomValue
- All Implemented Interfaces:
Serializable,RepairDoubleSolution
- Version:
- 1.0
- Author:
- Antonio J. Nebro
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorRepairDoubleSolutionWithRandomValue(BoundedRandomGenerator<Double> randomGenerator) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondoublerepairSolutionVariableValue(double value, double lowerBound, double upperBound) Checks if the value is between its bounds; if not, a random value between the limits is returned
-
Constructor Details
-
RepairDoubleSolutionWithRandomValue
public RepairDoubleSolutionWithRandomValue()Constructor -
RepairDoubleSolutionWithRandomValue
Constructor
-
-
Method Details
-
repairSolutionVariableValue
public double repairSolutionVariableValue(double value, double lowerBound, double upperBound) Checks if the value is between its bounds; if not, a random value between the limits is returned- Specified by:
repairSolutionVariableValuein interfaceRepairDoubleSolution- Parameters:
value- The value to be checkedlowerBound-upperBound-- Returns:
- The same value if it is between the limits or a repaired value otherwise
-