Package org.opt4j.optimizer.ea
Class ConstantCrossoverRate
java.lang.Object
org.opt4j.optimizer.ea.ConstantCrossoverRate
- All Implemented Interfaces:
CrossoverRate
The
ConstantCrossoverRate represents a crossover rate that is
constant during the whole optimization.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstantCrossoverRate(double crossoverRate) Constructs aConstantCrossoverRatewith a given crossover rate. -
Method Summary
-
Field Details
-
crossoverRate
protected final double crossoverRate
-
-
Constructor Details
-
ConstantCrossoverRate
@Inject public ConstantCrossoverRate(double crossoverRate) Constructs aConstantCrossoverRatewith a given crossover rate.- Parameters:
crossoverRate- the crossover rate
-
-
Method Details
-
get
public double get()Description copied from interface:CrossoverRateReturns the crossover rate as a double value.- Specified by:
getin interfaceCrossoverRate- Returns:
- the crossover rate
-
set
public void set(double value) Description copied from interface:CrossoverRateSets the crossover rate to a double value.- Specified by:
setin interfaceCrossoverRate- Parameters:
value- the new crossover rate
-