|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.stoppingcondition.MaximumIterations
public class MaximumIterations
Field Summary |
---|
Fields inherited from interface net.sourceforge.cilib.stoppingcondition.StoppingCondition |
---|
CICLOPS_EXCLUDE_ALGORITHM |
Constructor Summary | |
---|---|
MaximumIterations()
Creates a new instance of MaximumIterations. |
|
MaximumIterations(int maximumIterations)
Create an instance, with the given number of iterations. |
|
MaximumIterations(MaximumIterations copy)
Copy constructor. |
Method Summary | |
---|---|
MaximumIterations |
getClone()
Create a cloned copy of the current object and return it. |
int |
getMaximumIterations()
Get the maximum iteration count. |
double |
getPercentageCompleted()
Determines the percentage complete for the associated algorithm. |
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 |
setMaximumIterations(int maximumIterations)
Set the maximum number of iterations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MaximumIterations()
public MaximumIterations(MaximumIterations copy)
copy
- The instance to copy.public MaximumIterations(int maximumIterations)
maximumIterations
- The maximum number of iterations.Method Detail |
---|
public MaximumIterations getClone()
getClone
in interface StoppingCondition
getClone
in interface Cloneable
Object.clone()
public int getMaximumIterations()
public void setMaximumIterations(int maximumIterations)
maximumIterations
- The value to set.public double getPercentageCompleted()
getPercentageCompleted
in interface StoppingCondition
public boolean isCompleted()
StoppingCondition.getPercentageCompleted()
== 1.0 but may be more efficient).
isCompleted
in interface StoppingCondition
public void setAlgorithm(Algorithm algorithm)
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |