Package pal.algorithmics
Class StoppingCriteria.Utils
- java.lang.Object
-
- pal.algorithmics.StoppingCriteria.Utils
-
- Enclosing interface:
- StoppingCriteria
public static class StoppingCriteria.Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StoppingCriteria.FactorygetCombined(StoppingCriteria.Factory[] subCriteria)A stopping criteria that is a composite of a set of criteria, stops when at least one sub criteria wants to stopstatic StoppingCriteria.FactorygetIterationCount(int maxIterationCount)A stopping criteria that stops after a set number of iterationsstatic StoppingCriteria.FactorygetNonExactUnchangedScore(int maxIterationCountAtCurrentScore, boolean matchBestScore, double tolerance)A stopping criteria that works by counting how many iterations occur at a given score (either the best score or the current score) and stopping when score does not change after a set number of generationsstatic StoppingCriteria.FactorygetUnchangedScore(int maxIterationCountAtCurrentScore, boolean matchBestScore)A stopping criteria that works by counting how many iterations occur at a given score (either the best score or the current score) and stopping when score does not change after a set number of generations
-
-
-
Method Detail
-
getIterationCount
public static final StoppingCriteria.Factory getIterationCount(int maxIterationCount)
A stopping criteria that stops after a set number of iterations- Parameters:
maxIterationCount- the maximum number of iterations.
-
getUnchangedScore
public static final StoppingCriteria.Factory getUnchangedScore(int maxIterationCountAtCurrentScore, boolean matchBestScore)
A stopping criteria that works by counting how many iterations occur at a given score (either the best score or the current score) and stopping when score does not change after a set number of generations- Parameters:
maxIterationCountAtCurrentScore- the number of iterations to wait at the current score before stoppingmatchBestScore- if true will examine the best score so far, else will examine the current score so far.
-
getNonExactUnchangedScore
public static final StoppingCriteria.Factory getNonExactUnchangedScore(int maxIterationCountAtCurrentScore, boolean matchBestScore, double tolerance)
A stopping criteria that works by counting how many iterations occur at a given score (either the best score or the current score) and stopping when score does not change after a set number of generations- Parameters:
maxIterationCountAtCurrentScore- the number of iterations to wait at the current score before stoppingmatchBestScore- if true will examine the best score so far, else will examine the current score so far.
-
getCombined
public static final StoppingCriteria.Factory getCombined(StoppingCriteria.Factory[] subCriteria)
A stopping criteria that is a composite of a set of criteria, stops when at least one sub criteria wants to stop- Parameters:
subCriteria- an array of StoppingCriteria to combine
-
-