Skip to content
Snippets Groups Projects
Commit c6b073a0 authored by Sören Henning's avatar Sören Henning
Browse files

Fix bug introduced with f19a148c

parent f19a148c
No related branches found
No related tags found
No related merge requests found
Pipeline #10031 passed
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 }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment