public class ConstantCrossoverRate extends java.lang.Object implements CrossoverRate
ConstantCrossoverRate
represents a crossover rate that is
constant during the whole optimization.Modifier and Type | Field and Description |
---|---|
protected double |
crossoverRate |
Constructor and Description |
---|
ConstantCrossoverRate(double crossoverRate)
Constructs a
ConstantCrossoverRate with a given crossover rate. |
Modifier and Type | Method and Description |
---|---|
double |
get()
Returns the crossover rate as a double value.
|
void |
set(double value)
Sets the crossover rate to a double value.
|
@Inject public ConstantCrossoverRate(double crossoverRate)
ConstantCrossoverRate
with a given crossover rate.crossoverRate
- the crossover ratepublic double get()
CrossoverRate
get
in interface CrossoverRate
public void set(double value)
CrossoverRate
set
in interface CrossoverRate
value
- the new crossover rate