|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.bioinf.sequencealignment.DesiredMaximizationFitness
public class DesiredMaximizationFitness
This class serves as a crude implementation of a stopping condition that forces the optimizer to stop whenever a arbitrary fitness has been reached. Handy to measure how fast an optimizer gets to a goal fitness. Prevents wasting computational power and time when optimal solution has already been found.
Field Summary |
---|
Fields inherited from interface net.sourceforge.cilib.stoppingcondition.StoppingCondition |
---|
CICLOPS_EXCLUDE_ALGORITHM |
Constructor Summary | |
---|---|
DesiredMaximizationFitness()
|
|
DesiredMaximizationFitness(DesiredMaximizationFitness copy)
|
Method Summary | |
---|---|
DesiredMaximizationFitness |
getClone()
Create a cloned copy of the current object and return it. |
double |
getFitness()
|
double |
getPercentageCompleted()
Determines the percentage complete for the associated algorithm. |
int |
getQuitAnywayAfterIterations()
|
boolean |
isCompleted()
Determines whether the stopping condition has been satisfied (equivalent to StoppingCondition.getPercentageCompleted() == 1.0 but may be more efficient). |
void |
setAlgorithm(Algorithm algorithm)
Sets the algorithm that this stopping condition should be applied to. |
void |
setDesiredFitness(double desiredFitness)
|
void |
setQuitAnywayAfterIterations(int quitAnywayAfterIterations)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DesiredMaximizationFitness()
public DesiredMaximizationFitness(DesiredMaximizationFitness copy)
Method Detail |
---|
public DesiredMaximizationFitness getClone()
Cloneable
getClone
in interface StoppingCondition
getClone
in interface Cloneable
Object.clone()
public double getFitness()
public void setDesiredFitness(double desiredFitness)
public double getPercentageCompleted()
StoppingCondition
getPercentageCompleted
in interface StoppingCondition
public boolean isCompleted()
StoppingCondition
StoppingCondition.getPercentageCompleted()
== 1.0 but may be more efficient).
isCompleted
in interface StoppingCondition
public void setAlgorithm(Algorithm algorithm)
StoppingCondition
Algorithm.addStoppingCondition(StoppingCondition)
. This ensures that any down casting
necessary is done only once, when the stopping codition is added to an alogorithm (as apposed
to after each iteration).
setAlgorithm
in interface StoppingCondition
algorithm
- The applicable Algorithm
.public int getQuitAnywayAfterIterations()
public void setQuitAnywayAfterIterations(int quitAnywayAfterIterations)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |