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> | |
11 | * This strategy only retain the best offsprings to compose the next generation | |
12 | * of a population | |
13 | * | |
14 | */ | |
15 | @Value.Immutable | |
16 | public interface GenerationalReplacement extends ReplacementStrategy { | |
17 | ||
18 | public abstract SelectionPolicy offspringSelectionPolicy(); | |
19 | ||
20 | class Builder extends ImmutableGenerationalReplacement.Builder { | |
21 | } | |
22 | ||
23 | public static Builder builder() { | |
24 |
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(); |
25 | } | |
26 | ||
27 | } | |
Mutations | ||
24 |
1.1 2.2 |