|
1
|
|
package com.github.sanity.pav |
|
2
|
|
/** |
|
3
|
|
* Performs spline interpolation given a set of control points. |
|
4
|
|
* |
|
5
|
|
* This implementation converted from java from https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/util/MonotoneSpline.java |
|
6
|
|
* |
|
7
|
|
* Includes a fix for the following bug: https://code.google.com/p/android/issues/detail?id=222470 |
|
8
|
|
*/ |
|
9
|
|
class MonotoneSpline(private val xPoints: DoubleArray, private val yPoints: DoubleArray) { |
|
10
|
|
|
|
11
|
|
private val pointsWithTangents: DoubleArray |
|
12
|
|
|
|
13
|
|
init { |
|
14
|
3
1. : changed conditional boundary → SURVIVED
2. : negated conditional → KILLED
3. : negated conditional → KILLED
|
if (xPoints.size != yPoints.size || xPoints.size < 2) { |
|
15
|
|
throw IllegalArgumentException("There must be at least two control points and the arrays must be of equal length.") |
|
16
|
|
} |
|
17
|
|
val pointsCount = xPoints.size |
|
18
|
1
1. : Replaced integer subtraction with addition → SURVIVED
|
val d = DoubleArray(pointsCount - 1) // could optimize this out |
|
19
|
|
pointsWithTangents = DoubleArray(pointsCount) |
|
20
|
|
// Compute slopes of secant lines between successive points. |
|
21
|
6
1. : changed conditional boundary → SURVIVED
2. : negated conditional → SURVIVED
3. : negated conditional → SURVIVED
4. : Changed increment from 1 to -1 → KILLED
5. : Replaced integer subtraction with addition → KILLED
6. : Replaced integer subtraction with addition → KILLED
|
for (i in 0..pointsCount - 1 - 1) { |
|
22
|
2
1. : Replaced double subtraction with addition → SURVIVED
2. : Replaced integer addition with subtraction → KILLED
|
val h = xPoints[i + 1] - xPoints[i] |
|
23
|
2
1. : changed conditional boundary → SURVIVED
2. : negated conditional → KILLED
|
if (h <= 0f) { |
|
24
|
|
throw IllegalArgumentException("The control points must all have strictly increasing X values.") |
|
25
|
|
} |
|
26
|
3
1. : Replaced double subtraction with addition → SURVIVED
2. : Replaced double division with multiplication → SURVIVED
3. : Replaced integer addition with subtraction → KILLED
|
d[i] = (yPoints[i + 1] - yPoints[i]) / h |
|
27
|
|
} |
|
28
|
|
// Initialize the pointsWithTangents as the average of the secants. |
|
29
|
|
pointsWithTangents[0] = d[0] |
|
30
|
6
1. : changed conditional boundary → SURVIVED
2. : negated conditional → SURVIVED
3. : negated conditional → SURVIVED
4. : Changed increment from 1 to -1 → KILLED
5. : Replaced integer subtraction with addition → KILLED
6. : Replaced integer subtraction with addition → KILLED
|
for (i in 1..pointsCount - 1 - 1) { |
|
31
|
3
1. : Replaced double multiplication with division → SURVIVED
2. : Replaced integer subtraction with addition → KILLED
3. : Replaced double addition with subtraction → KILLED
|
pointsWithTangents[i] = (d[i - 1] + d[i]) * 0.5f |
|
32
|
|
} |
|
33
|
2
1. : Replaced integer subtraction with addition → KILLED
2. : Replaced integer subtraction with addition → KILLED
|
pointsWithTangents[pointsCount - 1] = d[pointsCount - 2] |
|
34
|
|
// Update the pointsWithTangents to preserve monotonicity. |
|
35
|
6
1. : changed conditional boundary → SURVIVED
2. : negated conditional → SURVIVED
3. : negated conditional → SURVIVED
4. : Changed increment from 1 to -1 → KILLED
5. : Replaced integer subtraction with addition → KILLED
6. : Replaced integer subtraction with addition → KILLED
|
for (i in 0..pointsCount - 1 - 1) { |
|
36
|
1
1. : negated conditional → SURVIVED
|
if (d[i] == 0.0) { |
|
37
|
|
// successive Y values are equal |
|
38
|
|
pointsWithTangents[i] = 0.0 |
|
39
|
1
1. : Replaced integer addition with subtraction → NO_COVERAGE
|
pointsWithTangents[i + 1] = 0.0 |
|
40
|
|
} else { |
|
41
|
1
1. : Replaced double division with multiplication → SURVIVED
|
val a = pointsWithTangents[i] / d[i] |
|
42
|
2
1. : Replaced double division with multiplication → SURVIVED
2. : Replaced integer addition with subtraction → KILLED
|
val b = pointsWithTangents[i + 1] / d[i] |
|
43
|
4
1. : changed conditional boundary → SURVIVED
2. : changed conditional boundary → SURVIVED
3. : negated conditional → KILLED
4. : negated conditional → KILLED
|
if (a < 0.0 || b < 0.0) { |
|
44
|
|
throw IllegalArgumentException("The control points must have monotonic Y values.") |
|
45
|
|
} |
|
46
|
|
val h = Math.hypot(a.toDouble(), b.toDouble()).toFloat() |
|
47
|
2
1. : changed conditional boundary → SURVIVED
2. : negated conditional → SURVIVED
|
if (h > 3.0) { |
|
48
|
1
1. : Replaced double division with multiplication → NO_COVERAGE
|
val t = 3.0 / h |
|
49
|
2
1. : Replaced double multiplication with division → NO_COVERAGE
2. : Replaced double multiplication with division → NO_COVERAGE
|
pointsWithTangents[i] = t * a * d[i] |
|
50
|
3
1. : Replaced integer addition with subtraction → NO_COVERAGE
2. : Replaced double multiplication with division → NO_COVERAGE
3. : Replaced double multiplication with division → NO_COVERAGE
|
pointsWithTangents[i + 1] = t * b * d[i] |
|
51
|
|
} |
|
52
|
|
} |
|
53
|
|
} |
|
54
|
|
} |
|
55
|
|
|
|
56
|
|
/** |
|
57
|
|
* Interpolates the value of Y = f(X) for given X. |
|
58
|
|
* Clamps X to the domain of the spline. |
|
59
|
|
|
|
60
|
|
* @param x The X value. |
|
61
|
|
* * |
|
62
|
|
* @return The interpolated Y = f(X) value. |
|
63
|
|
*/ |
|
64
|
|
fun interpolate(x: Double): Double { |
|
65
|
|
// Handle the boundary cases. |
|
66
|
|
val n = xPoints.size |
|
67
|
1
1. interpolate : negated conditional → KILLED
|
if (x.isNaN()) { |
|
68
|
1
1. interpolate : replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → NO_COVERAGE
|
return x |
|
69
|
|
} |
|
70
|
2
1. interpolate : changed conditional boundary → SURVIVED
2. interpolate : negated conditional → KILLED
|
if (x <= xPoints[0]) { |
|
71
|
1
1. interpolate : replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
return yPoints[0] |
|
72
|
|
} |
|
73
|
3
1. interpolate : changed conditional boundary → KILLED
2. interpolate : Replaced integer subtraction with addition → KILLED
3. interpolate : negated conditional → KILLED
|
if (x >= xPoints[n - 1]) { |
|
74
|
2
1. interpolate : Replaced integer subtraction with addition → KILLED
2. interpolate : replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
return yPoints[n - 1] |
|
75
|
|
} |
|
76
|
|
// Find the index 'i' of the last point with smaller X. |
|
77
|
|
// We know this will be within the spline due to the boundary tests. |
|
78
|
|
var i = 0 |
|
79
|
3
1. interpolate : changed conditional boundary → KILLED
2. interpolate : Replaced integer addition with subtraction → KILLED
3. interpolate : negated conditional → KILLED
|
while (x >= xPoints[i + 1]) { |
|
80
|
1
1. interpolate : Replaced integer addition with subtraction → KILLED
|
i += 1 |
|
81
|
1
1. interpolate : negated conditional → KILLED
|
if (x == yPoints[i]) { |
|
82
|
1
1. interpolate : replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → NO_COVERAGE
|
return yPoints[i] |
|
83
|
|
} |
|
84
|
|
} |
|
85
|
|
// Perform cubic Hermite spline interpolation. |
|
86
|
2
1. interpolate : Replaced double subtraction with addition → SURVIVED
2. interpolate : Replaced integer addition with subtraction → KILLED
|
val h = xPoints[i + 1] - xPoints[i] |
|
87
|
2
1. interpolate : Replaced double division with multiplication → SURVIVED
2. interpolate : Replaced double subtraction with addition → KILLED
|
val t = (x - xPoints[i]) / h |
|
88
|
23
1. interpolate : Replaced double addition with subtraction → SURVIVED
2. interpolate : Replaced double multiplication with division → SURVIVED
3. interpolate : Replaced double multiplication with division → SURVIVED
4. interpolate : Replaced double addition with subtraction → SURVIVED
5. interpolate : Replaced double subtraction with addition → SURVIVED
6. interpolate : Replaced double multiplication with division → SURVIVED
7. interpolate : Replaced double subtraction with addition → SURVIVED
8. interpolate : Replaced double multiplication with division → SURVIVED
9. interpolate : Replaced double subtraction with addition → SURVIVED
10. interpolate : Replaced double multiplication with division → SURVIVED
11. interpolate : Replaced double multiplication with division → SURVIVED
12. interpolate : Replaced double subtraction with addition → SURVIVED
13. interpolate : Replaced double multiplication with division → SURVIVED
14. interpolate : Replaced double addition with subtraction → SURVIVED
15. interpolate : Replaced double addition with subtraction → SURVIVED
16. interpolate : Replaced double multiplication with division → KILLED
17. interpolate : Replaced double multiplication with division → KILLED
18. interpolate : Replaced integer addition with subtraction → KILLED
19. interpolate : Replaced double multiplication with division → KILLED
20. interpolate : Replaced integer addition with subtraction → KILLED
21. interpolate : Replaced double multiplication with division → KILLED
22. interpolate : Replaced double multiplication with division → KILLED
23. interpolate : replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
return (yPoints[i] * (1 + 2 * t) + h * pointsWithTangents[i] * t) * (1 - t) * (1 - t) + (pointsWithTangents[i + 1] * (3 - 2 * t) + h * pointsWithTangents[i + 1] * (t - 1)) * t * t |
|
89
|
|
} |
|
90
|
|
|
|
91
|
|
// For debugging. |
|
92
|
|
override fun toString(): String { |
|
93
|
|
val str = StringBuilder() |
|
94
|
|
val n = xPoints.size |
|
95
|
|
str.append("[") |
|
96
|
5
1. toString : changed conditional boundary → NO_COVERAGE
2. toString : Changed increment from 1 to -1 → NO_COVERAGE
3. toString : Replaced integer subtraction with addition → NO_COVERAGE
4. toString : negated conditional → NO_COVERAGE
5. toString : negated conditional → NO_COVERAGE
|
for (i in 0..n - 1) { |
|
97
|
1
1. toString : negated conditional → NO_COVERAGE
|
if (i != 0) { |
|
98
|
|
str.append(", ") |
|
99
|
|
} |
|
100
|
|
str.append("(").append(xPoints[i]) |
|
101
|
|
str.append(", ").append(yPoints[i]) |
|
102
|
|
str.append(": ").append(pointsWithTangents[i]).append(")") |
|
103
|
|
} |
|
104
|
|
str.append("]") |
|
105
|
2
1. toString : mutated return of Object value for com/github/sanity/pav/MonotoneSpline::toString to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
2. toString : removed call to kotlin/jvm/internal/Intrinsics::checkExpressionValueIsNotNull → NO_COVERAGE
|
return str.toString() |
|
106
|
|
} |
|
107
|
|
|
|
108
|
|
companion object { |
|
109
|
|
/** |
|
110
|
|
* Creates a monotone cubic spline from a given set of control points. |
|
111
|
|
|
|
112
|
|
* The spline is guaranteed to pass through each control point exactly. |
|
113
|
|
* Moreover, assuming the control points are monotonic (Y is non-decreasing or |
|
114
|
|
* non-increasing) then the interpolated values will also be monotonic. |
|
115
|
|
|
|
116
|
|
* This function uses the Fritsch-Carlson method for computing the spline parameters. |
|
117
|
|
* http://en.wikipedia.org/wiki/Monotone_cubic_interpolation |
|
118
|
|
|
|
119
|
|
* @param x The X component of the control points, strictly increasing. |
|
120
|
|
* * |
|
121
|
|
* @param y The Y component of the control points, monotonic. |
|
122
|
|
* * |
|
123
|
|
* @return |
|
124
|
|
* * |
|
125
|
|
* * |
|
126
|
|
* @throws IllegalArgumentException if the X or Y arrays are null, have |
|
127
|
|
* * different lengths or have fewer than 2 values. |
|
128
|
|
* * |
|
129
|
|
* @throws IllegalArgumentException if the control points are not monotonic. |
|
130
|
|
*/ |
|
131
|
|
|
|
132
|
|
} |
|
133
|
|
} |
| | Mutations |
| 14 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED 3.3 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 18 |
|
1.1 Location : Killed by : none Replaced integer subtraction with addition → SURVIVED
|
| 21 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Changed increment from 1 to -1 → KILLED 3.3 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 4.4 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 5.5 Location : Killed by : none negated conditional → SURVIVED 6.6 Location : Killed by : none negated conditional → SURVIVED
|
| 22 |
|
1.1 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 2.2 Location : Killed by : none Replaced double subtraction with addition → SURVIVED
|
| 23 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 26 |
|
1.1 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 2.2 Location : Killed by : none Replaced double subtraction with addition → SURVIVED 3.3 Location : Killed by : none Replaced double division with multiplication → SURVIVED
|
| 30 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Changed increment from 1 to -1 → KILLED 3.3 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 4.4 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 5.5 Location : Killed by : none negated conditional → SURVIVED 6.6 Location : Killed by : none negated conditional → SURVIVED
|
| 31 |
|
1.1 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double addition with subtraction → KILLED 3.3 Location : Killed by : none Replaced double multiplication with division → SURVIVED
|
| 33 |
|
1.1 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED
|
| 35 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Changed increment from 1 to -1 → KILLED 3.3 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 4.4 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 5.5 Location : Killed by : none negated conditional → SURVIVED 6.6 Location : Killed by : none negated conditional → SURVIVED
|
| 36 |
|
1.1 Location : Killed by : none negated conditional → SURVIVED
|
| 39 |
|
1.1 Location : Killed by : none Replaced integer addition with subtraction → NO_COVERAGE
|
| 41 |
|
1.1 Location : Killed by : none Replaced double division with multiplication → SURVIVED
|
| 42 |
|
1.1 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 2.2 Location : Killed by : none Replaced double division with multiplication → SURVIVED
|
| 43 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : none changed conditional boundary → SURVIVED 3.3 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED 4.4 Location : Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 47 |
|
1.1 Location : Killed by : none changed conditional boundary → SURVIVED 2.2 Location : Killed by : none negated conditional → SURVIVED
|
| 48 |
|
1.1 Location : Killed by : none Replaced double division with multiplication → NO_COVERAGE
|
| 49 |
|
1.1 Location : Killed by : none Replaced double multiplication with division → NO_COVERAGE 2.2 Location : Killed by : none Replaced double multiplication with division → NO_COVERAGE
|
| 50 |
|
1.1 Location : Killed by : none Replaced integer addition with subtraction → NO_COVERAGE 2.2 Location : Killed by : none Replaced double multiplication with division → NO_COVERAGE 3.3 Location : Killed by : none Replaced double multiplication with division → NO_COVERAGE
|
| 67 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 68 |
|
1.1 Location : interpolate Killed by : none replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → NO_COVERAGE
|
| 70 |
|
1.1 Location : interpolate Killed by : none changed conditional boundary → SURVIVED 2.2 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 71 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
| 73 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec changed conditional boundary → KILLED 2.2 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 3.3 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 74 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer subtraction with addition → KILLED 2.2 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
| 79 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec changed conditional boundary → KILLED 2.2 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 3.3 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 80 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED
|
| 81 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec negated conditional → KILLED
|
| 82 |
|
1.1 Location : interpolate Killed by : none replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → NO_COVERAGE
|
| 86 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 2.2 Location : interpolate Killed by : none Replaced double subtraction with addition → SURVIVED
|
| 87 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double subtraction with addition → KILLED 2.2 Location : interpolate Killed by : none Replaced double division with multiplication → SURVIVED
|
| 88 |
|
1.1 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double multiplication with division → KILLED 2.2 Location : interpolate Killed by : none Replaced double addition with subtraction → SURVIVED 3.3 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 4.4 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 5.5 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double multiplication with division → KILLED 6.6 Location : interpolate Killed by : none Replaced double addition with subtraction → SURVIVED 7.7 Location : interpolate Killed by : none Replaced double subtraction with addition → SURVIVED 8.8 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 9.9 Location : interpolate Killed by : none Replaced double subtraction with addition → SURVIVED 10.10 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 11.11 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 12.12 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double multiplication with division → KILLED 13.13 Location : interpolate Killed by : none Replaced double subtraction with addition → SURVIVED 14.14 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 15.15 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced integer addition with subtraction → KILLED 16.16 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 17.17 Location : interpolate Killed by : none Replaced double subtraction with addition → SURVIVED 18.18 Location : interpolate Killed by : none Replaced double multiplication with division → SURVIVED 19.19 Location : interpolate Killed by : none Replaced double addition with subtraction → SURVIVED 20.20 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double multiplication with division → KILLED 21.21 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec Replaced double multiplication with division → KILLED 22.22 Location : interpolate Killed by : none Replaced double addition with subtraction → SURVIVED 23.23 Location : interpolate Killed by : com.github.sanity.pav.PairAdjacentViolatorsSpec.com.github.sanity.pav.PairAdjacentViolatorsSpec replaced return of double value with -(x + 1) for com/github/sanity/pav/MonotoneSpline::interpolate → KILLED
|
| 96 |
|
1.1 Location : toString Killed by : none changed conditional boundary → NO_COVERAGE 2.2 Location : toString Killed by : none Changed increment from 1 to -1 → NO_COVERAGE 3.3 Location : toString Killed by : none Replaced integer subtraction with addition → NO_COVERAGE 4.4 Location : toString Killed by : none negated conditional → NO_COVERAGE 5.5 Location : toString Killed by : none negated conditional → NO_COVERAGE
|
| 97 |
|
1.1 Location : toString Killed by : none negated conditional → NO_COVERAGE
|
| 105 |
|
1.1 Location : toString Killed by : none mutated return of Object value for com/github/sanity/pav/MonotoneSpline::toString to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE 2.2 Location : toString Killed by : none removed call to kotlin/jvm/internal/Intrinsics::checkExpressionValueIsNotNull → NO_COVERAGE
|