| 1 | package net.bmahe.genetics4j.gp.spec.mutation; | |
| 2 | ||
| 3 | import org.apache.commons.lang3.Validate; | |
| 4 | import org.immutables.value.Value; | |
| 5 | ||
| 6 | import net.bmahe.genetics4j.core.spec.mutation.MutationPolicy; | |
| 7 | ||
| 8 | @Value.Immutable | |
| 9 | public interface ProgramRandomPrune extends MutationPolicy { | |
| 10 | ||
| 11 | @Value.Parameter | |
| 12 | public double populationMutationProbability(); | |
| 13 | ||
| 14 | @Value.Check | |
| 15 | default void check() { | |
| 16 | Validate.inclusiveBetween(0.0, 1.0, populationMutationProbability()); | |
| 17 | } | |
| 18 | ||
| 19 | public static ProgramRandomPrune of(final double populationMutationProbability) { | |
| 20 |
2
1. of : removed call to net/bmahe/genetics4j/gp/spec/mutation/ImmutableProgramRandomPrune::of → KILLED 2. of : replaced return value with null for net/bmahe/genetics4j/gp/spec/mutation/ProgramRandomPrune::of → KILLED |
return ImmutableProgramRandomPrune.of(populationMutationProbability); |
| 21 | } | |
| 22 | } | |
Mutations | ||
| 20 |
1.1 2.2 |