|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.stoppingcondition.MinimumDiversity
public class MinimumDiversity
A stopping condition that is based on the Diversity
of the population. The
Algorithm
will stop as soon as the population's diversity drops below a (user-specified)
threshold for a (user-specified) number of consecutive iterations.
Field Summary |
---|
Fields inherited from interface net.sourceforge.cilib.stoppingcondition.StoppingCondition |
---|
CICLOPS_EXCLUDE_ALGORITHM |
Constructor Summary | |
---|---|
MinimumDiversity()
|
|
MinimumDiversity(MinimumDiversity rhs)
|
Method Summary | |
---|---|
MinimumDiversity |
getClone()
Create a cloned copy of the current object and return it. |
double |
getPercentageCompleted()
Calculate a rough completion percentage estimate of the Algorithm based on the
calculatedDiversity , maximumDiversity and minimumDiversity . |
boolean |
isCompleted()
Calculate the diversity of the population and store it. |
void |
setAlgorithm(Algorithm a)
Not used. |
void |
setConsecutiveIterations(ControlParameter ci)
Any ControlParameter can be used to control the consecutiveIterations value. |
void |
setDiversity(Diversity d)
The manner in which the diversity should be calculated can be constructed using the Diversity hierarchy and its strategies. |
void |
setMinimumDiversity(ControlParameter md)
Any ControlParameter can be used to control the minimumDiversity value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MinimumDiversity()
public MinimumDiversity(MinimumDiversity rhs)
Method Detail |
---|
public MinimumDiversity getClone()
Cloneable
getClone
in interface StoppingCondition
getClone
in interface Cloneable
Object.clone()
public double getPercentageCompleted()
Algorithm
based on the
calculatedDiversity
, maximumDiversity
and minimumDiversity
. It is
normal for the completion percentage to be irregular or unpredictable, because the
calculatedDiversity
and maximumDiversity
will sporadically change over time.
getPercentageCompleted
in interface StoppingCondition
public boolean isCompleted()
store
it. We also
keep track of the maximum diversity
. The number of consecutive
iterations
are incremented when calculatedDiversity
<
minimumDiversity
or reset to 0 otherwise.
isCompleted
in interface StoppingCondition
iterations
> consecutiveIterations
; false otherwisepublic void setMinimumDiversity(ControlParameter md)
ControlParameter
can be used to control the minimumDiversity
value.
md
- a ControlParameter
to control the minimumDiversity
valuepublic void setConsecutiveIterations(ControlParameter ci)
ControlParameter
can be used to control the consecutiveIterations
value.
ci
- a ControlParameter
to control the consecutiveIterations
valuepublic void setDiversity(Diversity d)
Diversity
hierarchy and its strategies.
d
- a Diversity
object that will be used to calculate the diversity of the
populationpublic void setAlgorithm(Algorithm a)
setAlgorithm
in interface StoppingCondition
a
- The applicable Algorithm
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |