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