Class TerminateByDistancePercAvg
java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminationCriterionBase
se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminateByDistancePercAvg
- All Implemented Interfaces:
 TerminationCriterion
Distance-based termination criterion:
 Termination is triggered when the relative distance between the average cost of plans
 in the current generation and in the previous generation has not exceeded
 a specified distance threshold for a number of generations.
- 
Field Summary
FieldsFields inherited from class se.liu.ida.hefquin.engine.queryproc.impl.poptimizer.evolutionaryAlgorithm.TerminationCriterionBase
nrGenerations - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic TerminationCriterionFactorygetFactory(double percAvgThreshold) booleanreadyToTerminate(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
- 
percAvgThreshold
protected final double percAvgThreshold 
 - 
 - 
Constructor Details
- 
TerminateByDistancePercAvg
 
 - 
 - 
Method Details
- 
getFactory
 - 
readyToTerminate
public boolean readyToTerminate(Generation currentGeneration, List<Generation> allPreviousGenerations) Description copied from interface:TerminationCriterionReturns 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
 
 -