public class MaxStepsWithoutImprovement extends Object implements StopCriterion
Constructor and Description |
---|
MaxStepsWithoutImprovement(long maxStepsWithoutImprovement)
Create a stop criterion to limit the number of steps without finding any improvement during a search run.
|
Modifier and Type | Method and Description |
---|---|
boolean |
searchShouldStop(Search<?> search)
Checks whether the maximum number of steps without finding improvement has been reached for the given search.
|
String |
toString() |
public MaxStepsWithoutImprovement(long maxStepsWithoutImprovement)
maxStepsWithoutImprovement
- maximum number of steps without improvementIllegalArgumentException
- if maxStepsWithoutImprovement
is ≤ 0public boolean searchShouldStop(Search<?> search)
searchShouldStop
in interface StopCriterion
search
- search for which the number of performed steps without finding any improvement has to be checkedtrue
if the given search has reached the maximum number of steps without improvementCopyright © 2016. All rights reserved.