AddNode.java

1
package net.bmahe.genetics4j.neat.spec.mutation;
2
3
import org.apache.commons.lang3.Validate;
4
import org.immutables.value.Value;
5
6
import net.bmahe.genetics4j.core.spec.mutation.MutationPolicy;
7
8
@Value.Immutable
9
public abstract class AddNode implements MutationPolicy {
10
11
	@Value.Parameter
12
	public abstract double populationMutationProbability();
13
14
	@Value.Check
15
	protected void check() {
16
		Validate.inclusiveBetween(0.0, 1.0, populationMutationProbability());
17
	}
18
19
	/**
20
	 * Construct a new immutable {@code AddNodeMutation} instance.
21
	 *
22
	 * @param populationMutationProbability The value for the
23
	 *                                      {@code populationMutationProbability}
24
	 *                                      attribute
25
	 * @return An immutable AddNodeMutation instance
26
	 */
27
	public static AddNode of(final double populationMutationProbability) {
28 2 1. of : removed call to net/bmahe/genetics4j/neat/spec/mutation/ImmutableAddNode::of → KILLED
2. of : replaced return value with null for net/bmahe/genetics4j/neat/spec/mutation/AddNode::of → KILLED
		return ImmutableAddNode.of(populationMutationProbability);
29
	}
30
31
}

Mutations

28

1.1
Location : of
Killed by : net.bmahe.genetics4j.neat.mutation.AddNodePolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.AddNodePolicyHandlerTest]/[method:createMutator()]
removed call to net/bmahe/genetics4j/neat/spec/mutation/ImmutableAddNode::of → KILLED

2.2
Location : of
Killed by : net.bmahe.genetics4j.neat.mutation.AddNodePolicyHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.neat.mutation.AddNodePolicyHandlerTest]/[method:createMutator()]
replaced return value with null for net/bmahe/genetics4j/neat/spec/mutation/AddNode::of → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.6