MultiPointArithmetic.java

1
package net.bmahe.genetics4j.core.spec.combination;
2
3
import org.apache.commons.lang3.Validate;
4
import org.immutables.value.Value;
5
6
@Value.Immutable
7
public abstract class MultiPointArithmetic implements CombinationPolicy {
8
9
	public static final double DEFAULT_ALPHA = 0.5d;
10
11
	@Value.Parameter
12
	public abstract int numCrossovers();
13
14
	@Value.Parameter
15
	@Value.Default
16
	public double alpha() {
17 2 1. alpha : replaced double return with 0.0d for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::alpha → NO_COVERAGE
2. alpha : Substituted 0.5 with 1.0 → NO_COVERAGE
		return DEFAULT_ALPHA;
18
	}
19
20
	public static MultiPointArithmetic of(final int numCrossovers, final double alpha) {
21
		Validate.isTrue(numCrossovers > 0);
22 2 1. of : removed call to net/bmahe/genetics4j/core/spec/combination/ImmutableMultiPointArithmetic::of → KILLED
2. of : replaced return value with null for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → KILLED
		return ImmutableMultiPointArithmetic.of(numCrossovers, alpha);
23
	}
24
25
	public static MultiPointArithmetic of(final int numCrossovers) {
26 3 1. of : Substituted 0.5 with 1.0 → NO_COVERAGE
2. of : removed call to net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → NO_COVERAGE
3. of : replaced return value with null for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → NO_COVERAGE
		return of(numCrossovers, DEFAULT_ALPHA);
27
	}
28
}

Mutations

17

1.1
Location : alpha
Killed by : none
replaced double return with 0.0d for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::alpha → NO_COVERAGE

2.2
Location : alpha
Killed by : none
Substituted 0.5 with 1.0 → NO_COVERAGE

22

1.1
Location : of
Killed by : net.bmahe.genetics4j.core.combination.multipointarithmetic.FloatChromosomeMultiPointArithmeticTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.combination.multipointarithmetic.FloatChromosomeMultiPointArithmeticTest]/[method:combineTest()]
removed call to net/bmahe/genetics4j/core/spec/combination/ImmutableMultiPointArithmetic::of → KILLED

2.2
Location : of
Killed by : net.bmahe.genetics4j.core.combination.multipointarithmetic.FloatChromosomeMultiPointArithmeticTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.combination.multipointarithmetic.FloatChromosomeMultiPointArithmeticTest]/[method:combineTest()]
replaced return value with null for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → KILLED

26

1.1
Location : of
Killed by : none
Substituted 0.5 with 1.0 → NO_COVERAGE

2.2
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → NO_COVERAGE

3.3
Location : of
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/spec/combination/MultiPointArithmetic::of → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.6