public final class RastriginStep extends java.lang.Object implements Step<DoubleVectorSolution>
Modifier and Type | Field and Description |
---|---|
private double |
chanceToMutate |
private double |
chanceToRecombine |
private JavaRandomGenerator |
generator |
private static org.slf4j.Logger |
logger |
private double |
mutationRange |
Constructor and Description |
---|
RastriginStep(JavaRandomGenerator generator,
double chanceToRecombine,
double chanceToMutate,
double mutationRange) |
Modifier and Type | Method and Description |
---|---|
io.vavr.collection.List<DoubleVectorSolution> |
stepOn(long stepNumber,
io.vavr.collection.List<DoubleVectorSolution> population)
Method invoked during each iteration.
|
private static final org.slf4j.Logger logger
private final JavaRandomGenerator generator
private final double chanceToRecombine
private final double chanceToMutate
private final double mutationRange
@Inject public RastriginStep(JavaRandomGenerator generator, @Value(value="${individual.chanceToRecombine}") double chanceToRecombine, @Value(value="${individual.chanceToMutate}") double chanceToMutate, @Value(value="${feature.mutationRange}") double mutationRange)
public io.vavr.collection.List<DoubleVectorSolution> stepOn(long stepNumber, io.vavr.collection.List<DoubleVectorSolution> population)
Step
Method invoked during each iteration. Make sure that a minimum number of operations is executed here.
stepOn
in interface Step<DoubleVectorSolution>
stepNumber
- the current step numberpopulation
- the current population