public class ConstantMutationRate extends java.lang.Object implements MutationRate
MutationRate
is set once.Modifier and Type | Field and Description |
---|---|
protected double |
rate |
Constructor and Description |
---|
ConstantMutationRate(double rate)
Constructs a
ConstantMutationRate with a given value. |
Modifier and Type | Method and Description |
---|---|
double |
get()
Returns the mutation rate as a double value.
|
void |
set(double value)
Sets the mutation to a double value.
|
@Inject public ConstantMutationRate(double rate)
ConstantMutationRate
with a given value.rate
- the mutation rate valuepublic double get()
MutationRate
get
in interface MutationRate
public void set(double value)
MutationRate
set
in interface MutationRate
value
- the new muation rate