TournamentNSGA2SelectionPolicyHandlerFactory.java

1
package net.bmahe.genetics4j.moo.nsga2.impl;
2
3
import java.util.Objects;
4
import java.util.random.RandomGenerator;
5
6
import net.bmahe.genetics4j.core.selection.SelectionPolicyHandler;
7
import net.bmahe.genetics4j.core.spec.AbstractEAExecutionContext;
8
import net.bmahe.genetics4j.core.spec.SelectionPolicyHandlerFactory;
9
10
public class TournamentNSGA2SelectionPolicyHandlerFactory<T extends Comparable<T>>
11
		implements SelectionPolicyHandlerFactory<T>
12
{
13
14
	@Override
15
	public SelectionPolicyHandler<T> apply(final AbstractEAExecutionContext<T> abstractEAExecutionContext) {
16
		Objects.requireNonNull(abstractEAExecutionContext);
17
18 1 1. apply : removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::randomGenerator → KILLED
		final RandomGenerator randomGenerator = abstractEAExecutionContext.randomGenerator();
19 2 1. apply : replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2SelectionPolicyHandlerFactory::apply → SURVIVED
2. apply : removed call to net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2SelectionPolicyHandler::<init> → SURVIVED
		return new TournamentNSGA2SelectionPolicyHandler<>(randomGenerator);
20
	}
21
}

Mutations

18

1.1
Location : apply
Killed by : net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectionPolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.moo.nsga2.impl.TournamentNSGA2SelectionPolicyHandlerTest]/[method:resolveWrongSelectionSpec()]
removed call to net/bmahe/genetics4j/core/spec/AbstractEAExecutionContext::randomGenerator → KILLED

19

1.1
Location : apply
Killed by : none
replaced return value with null for net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2SelectionPolicyHandlerFactory::apply → SURVIVED
Covering tests

2.2
Location : apply
Killed by : none
removed call to net/bmahe/genetics4j/moo/nsga2/impl/TournamentNSGA2SelectionPolicyHandler::<init> → SURVIVED Covering tests

Active mutators

Tests examined


Report generated by PIT 1.25.7 support