diff --git a/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt index b1c436c32153b8a22e8dbabe6b0dbfd895f7a804..a1f58b777b7ff8798ac058bac8aee18c5a1dc35a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt @@ -1,6 +1,7 @@ package rocks.theodolite.core.strategies.restrictionstrategy import rocks.theodolite.core.Results +import java.util.* /** * The [LowerBoundRestriction] sets the lower bound of the resources to be examined in the experiment to the value @@ -13,7 +14,8 @@ import rocks.theodolite.core.Results class LowerBoundRestriction(results: Results) : RestrictionStrategy(results) { override fun apply(xValue: Int, yValues: List<Int>): List<Int> { - val maxXValue = this.results.getMaxBenchmarkedXDimensionValue(xValue) + // Get previous largest x value or return full list + val maxXValue = this.results.getMaxBenchmarkedXDimensionValue(xValue) ?: return yValues.toList() // Get previous largest y value or restrict to empty list val lowerBound: Int = this.results.getOptYDimensionValue(maxXValue) ?: return listOf() return yValues.filter { x -> x >= lowerBound }