public class MaxTimeWithoutImprovement extends Object implements StopCriterion
| Constructor and Description |
|---|
MaxTimeWithoutImprovement(long maxTimeWithoutImprovement,
TimeUnit timeUnit)
Create a stop criterion to limit the time without finding any improvement during a search run.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
searchShouldStop(Search<?> search)
Checks whether the maximum time without finding improvements has been reached for the given search.
|
String |
toString() |
public MaxTimeWithoutImprovement(long maxTimeWithoutImprovement,
TimeUnit timeUnit)
maxTimeWithoutImprovement - maximum time without improvementtimeUnit - corresponding time unitIllegalArgumentException - if given time is smaller than 1 millisecondpublic boolean searchShouldStop(Search<?> search)
searchShouldStop in interface StopCriterionsearch - search for which the time without finding improvements has to be checkedtrue if the given search has reached the maximum time without improvementCopyright © 2016. All rights reserved.