Class TerminateByDiversityRelStDev
java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminationCriterionBase
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminateByDiversityRelStDev
- All Implemented Interfaces:
TerminationCriterion
Diversity-based termination criterion:
Termination is triggered when the relative standard deviation of the cost values
within the current generation is below a given threshold or the N-th generation is reached.
-
Field Summary
Fields inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminationCriterionBase
nrGenerations
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TerminationCriterionFactory
getFactory
(double relStDevThreshold) boolean
readyToTerminate
(Generation currentGeneration, List<Generation> allPreviousGenerations) Returns true if this termination criterion has been reached with the current generation.Methods inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminationCriterionBase
calcFactorial, countNumOfOps
-
Field Details
-
relStDevThreshold
protected final double relStDevThreshold
-
-
Constructor Details
-
TerminateByDiversityRelStDev
-
-
Method Details
-
getFactory
-
readyToTerminate
public boolean readyToTerminate(Generation currentGeneration, List<Generation> allPreviousGenerations) Description copied from interface:TerminationCriterion
Returns true if this termination criterion has been reached with the current generation.- Parameters:
currentGeneration
- the current generation for which the termination criterion is testallPreviousGenerations
- a list of all previous generations, in the order in which they have been created
-