EASystemFactory.java

1
package net.bmahe.genetics4j.core;
2
3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Optional;
6
import java.util.concurrent.ExecutorService;
7
import java.util.concurrent.ForkJoinPool;
8
import java.util.stream.Collectors;
9
10
import org.apache.commons.lang3.Validate;
11
12
import net.bmahe.genetics4j.core.combination.ChromosomeCombinator;
13
import net.bmahe.genetics4j.core.combination.ChromosomeCombinatorResolver;
14
import net.bmahe.genetics4j.core.evaluation.FitnessEvaluator;
15
import net.bmahe.genetics4j.core.evaluation.FitnessEvaluatorBulkAsync;
16
import net.bmahe.genetics4j.core.evaluation.FitnessEvaluatorSync;
17
import net.bmahe.genetics4j.core.mutation.MutationPolicyHandlerResolver;
18
import net.bmahe.genetics4j.core.mutation.Mutator;
19
import net.bmahe.genetics4j.core.replacement.ReplacementStrategyHandler;
20
import net.bmahe.genetics4j.core.selection.SelectionPolicyHandlerResolver;
21
import net.bmahe.genetics4j.core.spec.AbstractEAConfiguration;
22
import net.bmahe.genetics4j.core.spec.AbstractEAExecutionContext;
23
import net.bmahe.genetics4j.core.spec.EAConfiguration;
24
import net.bmahe.genetics4j.core.spec.EAConfigurationBulkAsync;
25
import net.bmahe.genetics4j.core.spec.EAExecutionContext;
26
import net.bmahe.genetics4j.core.spec.combination.CombinationPolicy;
27
import net.bmahe.genetics4j.core.spec.mutation.MutationPolicy;
28
29
/**
30
 * Factory class providing convenient methods for creating properly configured {@link EASystem} instances.
31
 * 
32
 * <p>EASystemFactory simplifies the complex process of assembling all the components required for
33
 * evolutionary algorithms by providing pre-configured factory methods that handle the initialization
34
 * and wiring of selection strategies, mutation operators, combination policies, and fitness evaluators.
35
 * 
36
 * <p>The factory abstracts away the complexity of manually creating and configuring:
37
 * <ul>
38
 * <li><strong>Selection policy resolvers</strong>: Components that match selection strategies to implementations</li>
39
 * <li><strong>Mutation policy resolvers</strong>: Components that handle different mutation strategies</li>
40
 * <li><strong>Chromosome combinators</strong>: Components responsible for crossover operations</li>
41
 * <li><strong>Replacement strategy handlers</strong>: Components managing population replacement</li>
42
 * <li><strong>Fitness evaluators</strong>: Components handling fitness computation strategies</li>
43
 * </ul>
44
 * 
45
 * <p>Factory methods are organized by evaluation strategy:
46
 * <ul>
47
 * <li><strong>Synchronous evaluation</strong>: Traditional single-threaded or parallel evaluation using {@link EAConfiguration}</li>
48
 * <li><strong>Bulk asynchronous evaluation</strong>: Batch processing for external services or GPU acceleration using {@link EAConfigurationBulkAsync}</li>
49
 * <li><strong>Custom evaluation</strong>: User-provided {@link FitnessEvaluator} implementations</li>
50
 * </ul>
51
 * 
52
 * <p>Common usage patterns:
53
 * <pre>{@code
54
 * // Simple synchronous evaluation with default thread pool
55
 * EAConfiguration<Double> config = EAConfigurationBuilder.<Double>builder()
56
 *     .chromosomeSpecs(chromosomeSpec)
57
 *     .parentSelectionPolicy(Tournament.of(3))
58
 *     .combinationPolicy(SinglePointCrossover.build())
59
 *     .mutationPolicies(List.of(RandomMutation.of(0.1)))
60
 *     .replacementStrategy(Elitism.builder().offspringRatio(0.8).build())
61
 *     .build();
62
 * 
63
 * EAExecutionContext<Double> context = EAExecutionContextBuilder.<Double>builder()
64
 *     .populationSize(100)
65
 *     .fitness(genotype -> computeFitness(genotype))
66
 *     .termination(Generations.of(100))
67
 *     .build();
68
 * 
69
 * EASystem<Double> eaSystem = EASystemFactory.from(config, context);
70
 * 
71
 * // Asynchronous evaluation for expensive fitness functions
72
 * EAConfigurationBulkAsync<Double> asyncConfig = EAConfigurationBulkAsyncBuilder.<Double>builder()
73
 *     .chromosomeSpecs(chromosomeSpec)
74
 *     .parentSelectionPolicy(Tournament.of(3))
75
 *     .combinationPolicy(SinglePointCrossover.build())
76
 *     .mutationPolicies(List.of(RandomMutation.of(0.1)))
77
 *     .replacementStrategy(Elitism.builder().offspringRatio(0.8).build())
78
 *     .fitnessBulkAsync(genotypes -> evaluateBatch(genotypes))
79
 *     .build();
80
 * 
81
 * EASystem<Double> asyncSystem = EASystemFactory.from(asyncConfig, context);
82
 * 
83
 * // Custom evaluation strategy
84
 * FitnessEvaluator<Double> customEvaluator = new CachedFitnessEvaluator<>(baseFitness, cacheSize);
85
 * EASystem<Double> customSystem = EASystemFactory.from(config, context, executorService, customEvaluator);
86
 * }</pre>
87
 * 
88
 * <p>Factory method selection guide:
89
 * <ul>
90
 * <li><strong>Fast fitness functions</strong>: Use synchronous methods with {@link EAConfiguration}</li>
91
 * <li><strong>Expensive fitness functions</strong>: Use asynchronous methods with {@link EAConfigurationBulkAsync}</li>
92
 * <li><strong>External fitness computation</strong>: Use custom evaluator methods</li>
93
 * <li><strong>GPU acceleration</strong>: Use bulk async methods for batch processing</li>
94
 * </ul>
95
 * 
96
 * <p>Thread pool considerations:
97
 * <ul>
98
 * <li><strong>Default behavior</strong>: Uses {@link ForkJoinPool#commonPool()} for automatic parallelization</li>
99
 * <li><strong>Custom thread pools</strong>: Provide specific {@link ExecutorService} for resource control</li>
100
 * <li><strong>Single-threaded</strong>: Use {@link java.util.concurrent.Executors#newSingleThreadExecutor()}</li>
101
 * <li><strong>Resource management</strong>: Caller responsible for shutdown of custom thread pools</li>
102
 * </ul>
103
 * 
104
 * @see EASystem
105
 * @see EAConfiguration
106
 * @see EAConfigurationBulkAsync
107
 * @see EAExecutionContext
108
 * @see FitnessEvaluator
109
 */
110
public class EASystemFactory {
111
112
	/**
113
	 * Prevents instantiation since it's a bunch of static methods
114
	 */
115
	private EASystemFactory() {
116
	}
117
118
	/**
119
	 * Creates an {@link EASystem} with a custom fitness evaluator and explicit thread pool.
120
	 * 
121
	 * <p>This is the most flexible factory method that allows complete control over all components
122
	 * of the evolutionary algorithm system. It assembles and wires all necessary components including
123
	 * selection strategies, mutation operators, chromosome combinators, and replacement strategies.
124
	 * 
125
	 * <p>This method is primarily used internally by other factory methods, but can be used directly
126
	 * when you need to provide a custom {@link FitnessEvaluator} implementation such as cached,
127
	 * distributed, or specialized evaluation strategies.
128
	 * 
129
	 * @param <T> the type of fitness values, must be comparable for selection operations
130
	 * @param eaConfiguration the evolutionary algorithm configuration specifying genetic operators and strategies
131
	 * @param eaExecutionContext the execution context containing population parameters and fitness functions
132
	 * @param executorService the thread pool for parallel operations (caller responsible for shutdown)
133
	 * @param fitnessEvaluator the fitness evaluator implementation to use for population evaluation
134
	 * @return a fully configured {@link EASystem} ready for evolution execution
135
	 * @throws IllegalArgumentException if any parameter is null
136
	 * @throws IllegalStateException if no suitable replacement strategy handler can be found
137
	 */
138
	public static <T extends Comparable<T>> EASystem<T> from(final AbstractEAConfiguration<T> eaConfiguration,
139
			final AbstractEAExecutionContext<T> eaExecutionContext, final ExecutorService executorService,
140
			final FitnessEvaluator<T> fitnessEvaluator) {
141
		Validate.notNull(eaConfiguration);
142
		Validate.notNull(eaExecutionContext);
143
		Validate.notNull(executorService);
144
		Validate.notNull(fitnessEvaluator);
145
146 1 1. from : removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandlerResolver::<init> → KILLED
		final var selectionPolicyHandlerResolver = new SelectionPolicyHandlerResolver<T>(eaExecutionContext);
147
148
		final var parentSelectionPolicyHandler = selectionPolicyHandlerResolver
149 2 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::parentSelectionPolicy → KILLED
2. from : removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandlerResolver::resolve → KILLED
				.resolve(eaConfiguration.parentSelectionPolicy());
150
151 1 1. from : removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandler::resolve → KILLED
		final var parentSelector = parentSelectionPolicyHandler.resolve(eaExecutionContext,
152
				eaConfiguration,
153
				selectionPolicyHandlerResolver,
154 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::parentSelectionPolicy → KILLED
				eaConfiguration.parentSelectionPolicy());
155
156 1 1. from : removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandlerResolver::<init> → KILLED
		final var mutationPolicyHandlerResolver = new MutationPolicyHandlerResolver<T>(eaExecutionContext);
157
158 1 1. from : removed call to net/bmahe/genetics4j/core/combination/ChromosomeCombinatorResolver::<init> → KILLED
		final var chromosomeCombinatorResolver = new ChromosomeCombinatorResolver<T>(eaExecutionContext);
159
160 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::combinationPolicy → KILLED
		final CombinationPolicy combinationPolicy = eaConfiguration.combinationPolicy();
161 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::chromosomeSpecs → KILLED
		final List<ChromosomeCombinator<T>> chromosomeCombinators = eaConfiguration.chromosomeSpecs()
162 1 1. from : removed call to java/util/List::stream → KILLED
				.stream()
163 2 1. from : replaced call to java/util/stream/Stream::map with receiver → KILLED
2. from : removed call to java/util/stream/Stream::map → KILLED
				.map((chromosome) -> {
164 2 1. lambda$from$0 : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$0 → KILLED
2. lambda$from$0 : removed call to net/bmahe/genetics4j/core/combination/ChromosomeCombinatorResolver::resolve → KILLED
					return chromosomeCombinatorResolver.resolve(combinationPolicy, chromosome);
165
				})
166 2 1. from : removed call to java/util/stream/Collectors::toList → KILLED
2. from : removed call to java/util/stream/Stream::collect → KILLED
				.collect(Collectors.toList());
167
168 1 1. from : removed call to java/util/ArrayList::<init> → KILLED
		final List<Mutator> mutators = new ArrayList<>();
169 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::mutationPolicies → KILLED
		final List<MutationPolicy> mutationPolicies = eaConfiguration.mutationPolicies();
170 6 1. from : Substituted 0 with 1 → SURVIVED
2. from : removed call to java/util/List::size → SURVIVED
3. from : negated conditional → SURVIVED
4. from : removed conditional - replaced comparison check with false → SURVIVED
5. from : changed conditional boundary → KILLED
6. from : removed conditional - replaced comparison check with true → KILLED
		for (int i = 0; i < mutationPolicies.size(); i++) {
171 1 1. from : removed call to java/util/List::get → KILLED
			final var mutationPolicy = mutationPolicies.get(i);
172
173 1 1. from : removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandlerResolver::resolve → KILLED
			final var mutationPolicyHandler = mutationPolicyHandlerResolver.resolve(mutationPolicy);
174
			final var mutator = mutationPolicyHandler
175 1 1. from : removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandler::createMutator → KILLED
					.createMutator(eaExecutionContext, eaConfiguration, mutationPolicyHandlerResolver, mutationPolicy);
176
177 1 1. from : removed call to java/util/List::add → SURVIVED
			mutators.add(mutator);
178
179
		}
180
181 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::replacementStrategyHandlers → KILLED
		final var replacementStrategyHandlers = eaExecutionContext.replacementStrategyHandlers();
182 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::replacementStrategy → KILLED
		final var replacementStrategy = eaConfiguration.replacementStrategy();
183
184 1 1. from : removed call to java/util/List::stream → KILLED
		final Optional<ReplacementStrategyHandler<T>> replacementStrategyHandlerOpt = replacementStrategyHandlers.stream()
185 5 1. lambda$from$1 : replaced boolean return with true for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$1 → SURVIVED
2. from : replaced call to java/util/stream/Stream::filter with receiver → SURVIVED
3. lambda$from$1 : replaced boolean return with false for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$1 → KILLED
4. lambda$from$1 : removed call to net/bmahe/genetics4j/core/replacement/ReplacementStrategyHandler::canHandle → KILLED
5. from : removed call to java/util/stream/Stream::filter → KILLED
				.filter(replacementStrategyHandler -> replacementStrategyHandler.canHandle(replacementStrategy))
186 1 1. from : removed call to java/util/stream/Stream::findFirst → KILLED
				.findFirst();
187
188
		final ReplacementStrategyHandler<T> replacementStrategyHandler = replacementStrategyHandlerOpt
189 4 1. lambda$from$2 : removed call to java/lang/String::valueOf → NO_COVERAGE
2. lambda$from$2 : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$2 → NO_COVERAGE
3. lambda$from$2 : removed call to java/lang/IllegalStateException::<init> → NO_COVERAGE
4. from : removed call to java/util/Optional::orElseThrow → KILLED
				.orElseThrow(() -> new IllegalStateException(
190
						"Could not find an implementation to handle the replacement strategy " + replacementStrategy));
191
		final var replacementStrategyImplementor = replacementStrategyHandler
192 1 1. from : removed call to net/bmahe/genetics4j/core/replacement/ReplacementStrategyHandler::resolve → KILLED
				.resolve(eaExecutionContext, eaConfiguration, selectionPolicyHandlerResolver, replacementStrategy);
193
194 1 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::populationSize → KILLED
		final long populationSize = eaExecutionContext.populationSize();
195
196 1 1. from : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED
		return new EASystem<>(eaConfiguration,
197
				populationSize,
198
				chromosomeCombinators,
199 2 1. from : removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::offspringGeneratedRatio → KILLED
2. from : removed call to net/bmahe/genetics4j/core/EASystem::<init> → KILLED
				eaConfiguration.offspringGeneratedRatio(),
200
				parentSelector,
201
				mutators,
202
				replacementStrategyImplementor,
203
				eaExecutionContext,
204
				fitnessEvaluator);
205
	}
206
207
	/**
208
	 * Creates an {@link EASystem} with synchronous fitness evaluation and explicit thread pool.
209
	 * 
210
	 * <p>This method is ideal for scenarios where fitness computation is relatively fast and can benefit
211
	 * from parallel evaluation across multiple threads. The fitness function defined in the configuration
212
	 * will be called synchronously for each individual or in parallel depending on the evaluator implementation.
213
	 * 
214
	 * <p>Use this method when:
215
	 * <ul>
216
	 * <li>Fitness computation is CPU-bound and relatively fast (&lt; 100ms per evaluation)</li>
217
	 * <li>You want control over the thread pool used for parallel evaluation</li>
218
	 * <li>You need deterministic thread pool behavior for testing or resource management</li>
219
	 * </ul>
220
	 * 
221
	 * @param <T> the type of fitness values, must be comparable for selection operations
222
	 * @param eaConfigurationSync the synchronous EA configuration with a simple fitness function
223
	 * @param eaExecutionContext the execution context containing population and termination parameters
224
	 * @param executorService the thread pool for parallel fitness evaluation (caller responsible for shutdown)
225
	 * @return a configured {@link EASystem} using synchronous fitness evaluation
226
	 * @throws IllegalArgumentException if any parameter is null
227
	 */
228
	public static <T extends Comparable<T>> EASystem<T> from(final EAConfiguration<T> eaConfigurationSync,
229
			final EAExecutionContext<T> eaExecutionContext, final ExecutorService executorService) {
230
231 1 1. from : removed call to net/bmahe/genetics4j/core/evaluation/FitnessEvaluatorSync::<init> → KILLED
		final var fitnessEvaluator = new FitnessEvaluatorSync<>(eaExecutionContext, eaConfigurationSync, executorService);
232 2 1. from : removed call to net/bmahe/genetics4j/core/EASystemFactory::from → KILLED
2. from : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED
		return from(eaConfigurationSync, eaExecutionContext, executorService, fitnessEvaluator);
233
	}
234
235
	/**
236
	 * Creates an {@link EASystem} with synchronous fitness evaluation using the common thread pool.
237
	 * 
238
	 * <p>This is the most convenient method for creating evolutionary algorithms with simple fitness functions.
239
	 * It uses {@link ForkJoinPool#commonPool()} for automatic parallelization without requiring explicit
240
	 * thread pool management.
241
	 * 
242
	 * <p>This method is ideal for:
243
	 * <ul>
244
	 * <li>Quick prototyping and experimentation</li>
245
	 * <li>Applications where thread pool management is not critical</li>
246
	 * <li>Fast fitness functions that can benefit from automatic parallelization</li>
247
	 * <li>Educational purposes and simple examples</li>
248
	 * </ul>
249
	 * 
250
	 * @param <T> the type of fitness values, must be comparable for selection operations
251
	 * @param eaConfigurationSync the synchronous EA configuration with a simple fitness function
252
	 * @param eaExecutionContext the execution context containing population and termination parameters
253
	 * @return a configured {@link EASystem} using synchronous fitness evaluation with common thread pool
254
	 * @throws IllegalArgumentException if any parameter is null
255
	 */
256
	public static <T extends Comparable<T>> EASystem<T> from(final EAConfiguration<T> eaConfigurationSync,
257
			final EAExecutionContext<T> eaExecutionContext) {
258 1 1. from : removed call to java/util/concurrent/ForkJoinPool::commonPool → KILLED
		final ExecutorService executorService = ForkJoinPool.commonPool();
259 2 1. from : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED
2. from : removed call to net/bmahe/genetics4j/core/EASystemFactory::from → KILLED
		return from(eaConfigurationSync, eaExecutionContext, executorService);
260
	}
261
262
	/**
263
	 * Creates an {@link EASystem} with bulk asynchronous fitness evaluation and explicit thread pool.
264
	 * 
265
	 * <p>This method is designed for expensive fitness functions that can benefit from batch processing
266
	 * or asynchronous evaluation. The bulk async evaluator can process entire populations at once,
267
	 * enabling optimization strategies like GPU acceleration, external service calls, or database batch operations.
268
	 * 
269
	 * <p>Use this method when:
270
	 * <ul>
271
	 * <li>Fitness computation involves external resources (databases, web services, files)</li>
272
	 * <li>Evaluation can be accelerated through batch processing (GPU, vectorized operations)</li>
273
	 * <li>Fitness computation is expensive (&gt; 100ms per evaluation)</li>
274
	 * <li>You need to optimize I/O operations through batching</li>
275
	 * </ul>
276
	 * 
277
	 * @param <T> the type of fitness values, must be comparable for selection operations
278
	 * @param eaConfigurationBulkAsync the bulk async EA configuration with batch fitness evaluation
279
	 * @param eaExecutionContext the execution context containing population and termination parameters
280
	 * @param executorService the thread pool for managing asynchronous operations (caller responsible for shutdown)
281
	 * @return a configured {@link EASystem} using bulk asynchronous fitness evaluation
282
	 * @throws IllegalArgumentException if any parameter is null
283
	 */
284
	public static <T extends Comparable<T>> EASystem<T> from(final EAConfigurationBulkAsync<T> eaConfigurationBulkAsync,
285
			final EAExecutionContext<T> eaExecutionContext, final ExecutorService executorService) {
286
287 1 1. from : removed call to net/bmahe/genetics4j/core/evaluation/FitnessEvaluatorBulkAsync::<init> → NO_COVERAGE
		final var fitnessEvaluator = new FitnessEvaluatorBulkAsync<>(eaConfigurationBulkAsync, executorService);
288 2 1. from : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE
2. from : removed call to net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE
		return from(eaConfigurationBulkAsync, eaExecutionContext, executorService, fitnessEvaluator);
289
	}
290
291
	/**
292
	 * Creates an {@link EASystem} with bulk asynchronous fitness evaluation using the common thread pool.
293
	 * 
294
	 * <p>This convenience method provides the benefits of bulk asynchronous evaluation without requiring
295
	 * explicit thread pool management. It automatically uses {@link ForkJoinPool#commonPool()} for
296
	 * managing asynchronous operations.
297
	 * 
298
	 * <p>This method combines the convenience of automatic thread pool management with the power of
299
	 * bulk asynchronous evaluation, making it ideal for:
300
	 * <ul>
301
	 * <li>Expensive fitness functions in research and experimentation</li>
302
	 * <li>Applications requiring external resource access without complex thread management</li>
303
	 * <li>GPU-accelerated fitness evaluation with simple setup</li>
304
	 * <li>Prototype development with advanced evaluation strategies</li>
305
	 * </ul>
306
	 * 
307
	 * @param <T> the type of fitness values, must be comparable for selection operations
308
	 * @param eaConfigurationBulkAsync the bulk async EA configuration with batch fitness evaluation
309
	 * @param eaExecutionContext the execution context containing population and termination parameters
310
	 * @return a configured {@link EASystem} using bulk asynchronous fitness evaluation with common thread pool
311
	 * @throws IllegalArgumentException if any parameter is null
312
	 */
313
	public static <T extends Comparable<T>> EASystem<T> from(final EAConfigurationBulkAsync<T> eaConfigurationBulkAsync,
314
			final EAExecutionContext<T> eaExecutionContext) {
315 1 1. from : removed call to java/util/concurrent/ForkJoinPool::commonPool → NO_COVERAGE
		final ExecutorService executorService = ForkJoinPool.commonPool();
316 2 1. from : removed call to net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE
2. from : replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE
		return from(eaConfigurationBulkAsync, eaExecutionContext, executorService);
317
	}
318
}

Mutations

146

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandlerResolver::<init> → KILLED

149

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::parentSelectionPolicy → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandlerResolver::resolve → KILLED

151

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/selection/SelectionPolicyHandler::resolve → KILLED

154

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::parentSelectionPolicy → KILLED

156

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandlerResolver::<init> → KILLED

158

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/combination/ChromosomeCombinatorResolver::<init> → KILLED

160

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::combinationPolicy → KILLED

161

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::chromosomeSpecs → KILLED

162

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/List::stream → KILLED

163

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testEvolveWithPostEvaluationProcessor()]
replaced call to java/util/stream/Stream::map with receiver → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/stream/Stream::map → KILLED

164

1.1
Location : lambda$from$0
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testEvolveWithPostEvaluationProcessor()]
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$0 → KILLED

2.2
Location : lambda$from$0
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testEvolveWithPostEvaluationProcessor()]
removed call to net/bmahe/genetics4j/core/combination/ChromosomeCombinatorResolver::resolve → KILLED

166

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/stream/Collectors::toList → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/stream/Stream::collect → KILLED

168

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/ArrayList::<init> → KILLED

169

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::mutationPolicies → KILLED

170

1.1
Location : from
Killed by : none
Substituted 0 with 1 → SURVIVED
Covering tests

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
changed conditional boundary → KILLED

3.3
Location : from
Killed by : none
removed call to java/util/List::size → SURVIVED Covering tests

4.4
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed conditional - replaced comparison check with true → KILLED

5.5
Location : from
Killed by : none
negated conditional → SURVIVED Covering tests

6.6
Location : from
Killed by : none
removed conditional - replaced comparison check with false → SURVIVED Covering tests

171

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/List::get → KILLED

173

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandlerResolver::resolve → KILLED

175

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testEvolveWithPostEvaluationProcessor()]
removed call to net/bmahe/genetics4j/core/mutation/MutationPolicyHandler::createMutator → KILLED

177

1.1
Location : from
Killed by : none
removed call to java/util/List::add → SURVIVED
Covering tests

181

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::replacementStrategyHandlers → KILLED

182

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::replacementStrategy → KILLED

184

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/List::stream → KILLED

185

1.1
Location : lambda$from$1
Killed by : none
replaced boolean return with true for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$1 → SURVIVED
Covering tests

2.2
Location : lambda$from$1
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
replaced boolean return with false for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$1 → KILLED

3.3
Location : lambda$from$1
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/replacement/ReplacementStrategyHandler::canHandle → KILLED

4.4
Location : from
Killed by : none
replaced call to java/util/stream/Stream::filter with receiver → SURVIVED Covering tests

5.5
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/stream/Stream::filter → KILLED

186

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/stream/Stream::findFirst → KILLED

189

1.1
Location : lambda$from$2
Killed by : none
removed call to java/lang/String::valueOf → NO_COVERAGE

2.2
Location : lambda$from$2
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::lambda$from$2 → NO_COVERAGE

3.3
Location : lambda$from$2
Killed by : none
removed call to java/lang/IllegalStateException::<init> → NO_COVERAGE

4.4
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/Optional::orElseThrow → KILLED

192

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/replacement/ReplacementStrategyHandler::resolve → KILLED

194

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::populationSize → KILLED

196

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED

199

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testEvolveWithPostEvaluationProcessor()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAConfiguration::offspringGeneratedRatio → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/EASystem::<init> → KILLED

231

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/evaluation/FitnessEvaluatorSync::<init> → KILLED

232

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/EASystemFactory::from → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED

258

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to java/util/concurrent/ForkJoinPool::commonPool → KILLED

259

1.1
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → KILLED

2.2
Location : from
Killed by : net.bmahe.genetics4j.core.EASystemTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.EASystemTest]/[method:testGetterMethods()]
removed call to net/bmahe/genetics4j/core/EASystemFactory::from → KILLED

287

1.1
Location : from
Killed by : none
removed call to net/bmahe/genetics4j/core/evaluation/FitnessEvaluatorBulkAsync::<init> → NO_COVERAGE

288

1.1
Location : from
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE

2.2
Location : from
Killed by : none
removed call to net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE

315

1.1
Location : from
Killed by : none
removed call to java/util/concurrent/ForkJoinPool::commonPool → NO_COVERAGE

316

1.1
Location : from
Killed by : none
removed call to net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE

2.2
Location : from
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/EASystemFactory::from → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.6