| 1 | package net.bmahe.genetics4j.core.spec; | |
| 2 | ||
| 3 | import java.util.Arrays; | |
| 4 | ||
| 5 | import org.immutables.value.Value; | |
| 6 | ||
| 7 | import net.bmahe.genetics4j.core.FitnessBulkAsync; | |
| 8 | import net.bmahe.genetics4j.core.spec.chromosome.ChromosomeSpec; | |
| 9 | import net.bmahe.genetics4j.core.spec.mutation.MutationPolicy; | |
| 10 | ||
| 11 | /** | |
| 12 | * Evolutionary Algorithm Configuration. | |
| 13 | * <p>This describe the set of strategies to use. They describe the genotype, the different policies for selection, | |
| 14 | * combination as well as mutation, and other relevant parameters such as how to determine the fitness of a given | |
| 15 | * individual. | |
| 16 | * | |
| 17 | * @param <T> Type of the fitness measurement | |
| 18 | */ | |
| 19 | @Value.Immutable | |
| 20 | public abstract class EAConfigurationBulkAsync<T extends Comparable<T>> extends AbstractEAConfiguration<T> { | |
| 21 | ||
| 22 | /** | |
| 23 | * Defines how should individuals' fitness be assessed | |
| 24 | * | |
| 25 | * @return | |
| 26 | */ | |
| 27 | public abstract FitnessBulkAsync<T> fitness(); | |
| 28 | ||
| 29 | public static class Builder<T extends Comparable<T>> extends ImmutableEAConfigurationBulkAsync.Builder<T> { | |
| 30 | ||
| 31 | public final EAConfigurationBulkAsync.Builder<T> chromosomeSpecs(final ChromosomeSpec... elements) { | |
| 32 |
4
1. chromosomeSpecs : replaced call to net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::chromosomeSpecs with receiver → NO_COVERAGE 2. chromosomeSpecs : removed call to java/util/Arrays::asList → NO_COVERAGE 3. chromosomeSpecs : replaced return value with null for net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::chromosomeSpecs → NO_COVERAGE 4. chromosomeSpecs : removed call to net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::chromosomeSpecs → NO_COVERAGE |
return this.chromosomeSpecs(Arrays.asList(elements)); |
| 33 | } | |
| 34 | ||
| 35 | public final EAConfigurationBulkAsync.Builder<T> mutationPolicies(final MutationPolicy... elements) { | |
| 36 |
4
1. mutationPolicies : removed call to java/util/Arrays::asList → NO_COVERAGE 2. mutationPolicies : removed call to net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::mutationPolicies → NO_COVERAGE 3. mutationPolicies : replaced call to net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::mutationPolicies with receiver → NO_COVERAGE 4. mutationPolicies : replaced return value with null for net/bmahe/genetics4j/core/spec/EAConfigurationBulkAsync$Builder::mutationPolicies → NO_COVERAGE |
return this.mutationPolicies(Arrays.asList(elements)); |
| 37 | } | |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 32 |
1.1 2.2 3.3 4.4 |
|
| 36 |
1.1 2.2 3.3 4.4 |