| 1 | package net.bmahe.genetics4j.core.spec.replacement; | |
| 2 | ||
| 3 | import org.immutables.value.Value; | |
| 4 | ||
| 5 | import net.bmahe.genetics4j.core.spec.replacement.ImmutableGenerationalReplacement; | |
| 6 | import net.bmahe.genetics4j.core.spec.selection.SelectionPolicy; | |
| 7 | ||
| 8 | /** | |
| 9 | * Generational Replacement strategy | |
| 10 | * <p>This strategy only retain the best offsprings to compose the next generation of a population | |
| 11 | * | |
| 12 | */ | |
| 13 | @Value.Immutable | |
| 14 | public interface GenerationalReplacement extends ReplacementStrategy { | |
| 15 | ||
| 16 | public abstract SelectionPolicy offspringSelectionPolicy(); | |
| 17 | ||
| 18 | class Builder extends ImmutableGenerationalReplacement.Builder { | |
| 19 | } | |
| 20 | ||
| 21 | public static Builder builder() { | |
| 22 |
2
1. builder : removed call to net/bmahe/genetics4j/core/spec/replacement/GenerationalReplacement$Builder::<init> → NO_COVERAGE 2. builder : replaced return value with null for net/bmahe/genetics4j/core/spec/replacement/GenerationalReplacement::builder → NO_COVERAGE |
return new Builder(); |
| 23 | } | |
| 24 | ||
| 25 | } | |
Mutations | ||
| 22 |
1.1 2.2 |