FloatChromosomeSpec.java

1
package net.bmahe.genetics4j.core.spec.chromosome;
2
3
import org.apache.commons.lang3.Validate;
4
import org.immutables.value.Value;
5
6
import net.bmahe.genetics4j.core.spec.statistics.distributions.Distribution;
7
import net.bmahe.genetics4j.core.spec.statistics.distributions.UniformDistribution;
8
9
@Value.Immutable
10
public abstract class FloatChromosomeSpec implements ChromosomeSpec {
11
12
	@Value.Parameter
13
	public abstract int size();
14
15
	@Value.Parameter
16
	public abstract float minValue();
17
18
	@Value.Parameter
19
	public abstract float maxValue();
20
21
	@Value.Default
22
	public Distribution distribution() {
23 2 1. distribution : removed call to net/bmahe/genetics4j/core/spec/statistics/distributions/UniformDistribution::build → KILLED
2. distribution : replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::distribution → KILLED
		return UniformDistribution.build();
24
	}
25
26
	@Value.Check
27
	protected void check() {
28
		Validate.isTrue(size() > 0);
29
		Validate.isTrue(minValue() <= maxValue());
30
	}
31
32
	public static class Builder extends ImmutableFloatChromosomeSpec.Builder {
33
	}
34
35
	/**
36
	 * Construct a new immutable {@code FloatChromosomeSpec} instance.
37
	 * 
38
	 * @param size     The value for the {@code size} attribute
39
	 * @param minValue The value for the {@code minValue} attribute
40
	 * @param maxValue The value for the {@code maxValue} attribute
41
	 * @return An immutable FloatChromosomeSpec instance
42
	 */
43
44
	public static FloatChromosomeSpec of(final int size, final float minValue, final float maxValue) {
45 2 1. of : replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::of → KILLED
2. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec::of → KILLED
		return ImmutableFloatChromosomeSpec.of(size, minValue, maxValue);
46
	}
47
48
	public static FloatChromosomeSpec of(final int size, final float minValue, final float maxValue,
49
			final Distribution distribution) {
50
		Validate.notNull(distribution);
51
52 1 1. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::<init> → NO_COVERAGE
		final var floatChromosomeSpecBuilder = new ImmutableFloatChromosomeSpec.Builder();
53
54 1 1. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::size → NO_COVERAGE
		floatChromosomeSpecBuilder.size(size)
55 2 1. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::minValue → NO_COVERAGE
2. of : replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::minValue with receiver → NO_COVERAGE
				.minValue(minValue)
56 2 1. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::maxValue → NO_COVERAGE
2. of : replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::maxValue with receiver → NO_COVERAGE
				.maxValue(maxValue)
57 2 1. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::distribution → NO_COVERAGE
2. of : replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::distribution with receiver → NO_COVERAGE
				.distribution(distribution);
58
59 2 1. of : replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::of → NO_COVERAGE
2. of : removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::build → NO_COVERAGE
		return floatChromosomeSpecBuilder.build();
60
	}
61
}

Mutations

23

1.1
Location : distribution
Killed by : net.bmahe.genetics4j.core.chromosomes.factory.FloatChromosomeFactoryTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.factory.FloatChromosomeFactoryTest]/[method:canHandleTest()]
removed call to net/bmahe/genetics4j/core/spec/statistics/distributions/UniformDistribution::build → KILLED

2.2
Location : distribution
Killed by : net.bmahe.genetics4j.core.chromosomes.factory.FloatChromosomeFactoryTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.chromosomes.factory.FloatChromosomeFactoryTest]/[method:canHandleTest()]
replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::distribution → KILLED

45

1.1
Location : of
Killed by : net.bmahe.genetics4j.core.mutation.chromosome.randommutation.FloatChromosomeRandomMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.mutation.chromosome.randommutation.FloatChromosomeRandomMutationHandlerTest]/[method:canHandle()]
replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::of → KILLED

2.2
Location : of
Killed by : net.bmahe.genetics4j.core.mutation.chromosome.randommutation.FloatChromosomeRandomMutationHandlerTest.[engine:junit-jupiter]/[class:net.bmahe.genetics4j.core.mutation.chromosome.randommutation.FloatChromosomeRandomMutationHandlerTest]/[method:canHandle()]
removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec::of → KILLED

52

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::<init> → NO_COVERAGE

54

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::size → NO_COVERAGE

55

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::minValue → NO_COVERAGE

2.2
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::minValue with receiver → NO_COVERAGE

56

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::maxValue → NO_COVERAGE

2.2
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::maxValue with receiver → NO_COVERAGE

57

1.1
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::distribution → NO_COVERAGE

2.2
Location : of
Killed by : none
replaced call to net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec$Builder::distribution with receiver → NO_COVERAGE

59

1.1
Location : of
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/spec/chromosome/FloatChromosomeSpec::of → NO_COVERAGE

2.2
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/chromosome/ImmutableFloatChromosomeSpec$Builder::build → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.6