net.sourceforge.cilib.stoppingcondition
Class MaximumFitnessEvaluations

java.lang.Object
  extended by net.sourceforge.cilib.stoppingcondition.MaximumFitnessEvaluations
All Implemented Interfaces:
Serializable, StoppingCondition, Cloneable

public class MaximumFitnessEvaluations
extends Object
implements StoppingCondition

Author:
Edwin Peer
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sourceforge.cilib.stoppingcondition.StoppingCondition
CICLOPS_EXCLUDE_ALGORITHM
 
Constructor Summary
MaximumFitnessEvaluations()
          Creates a new instance of MaximumFitnessEvaluationsIndicator.
MaximumFitnessEvaluations(int maximumFitnessEvaluations)
           
MaximumFitnessEvaluations(MaximumFitnessEvaluations copy)
           
 
Method Summary
 MaximumFitnessEvaluations getClone()
          Create a cloned copy of the current object and return it.
 int getMaximumFitnessEvaluations()
           
 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 setMaximumFitnessEvaluations(int maximumFitnessEvaluations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaximumFitnessEvaluations

public MaximumFitnessEvaluations()
Creates a new instance of MaximumFitnessEvaluationsIndicator.


MaximumFitnessEvaluations

public MaximumFitnessEvaluations(MaximumFitnessEvaluations copy)

MaximumFitnessEvaluations

public MaximumFitnessEvaluations(int maximumFitnessEvaluations)
Method Detail

getClone

public MaximumFitnessEvaluations getClone()
Description copied from interface: Cloneable
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface StoppingCondition
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

setMaximumFitnessEvaluations

public void setMaximumFitnessEvaluations(int maximumFitnessEvaluations)

getMaximumFitnessEvaluations

public int getMaximumFitnessEvaluations()

getPercentageCompleted

public double getPercentageCompleted()
Description copied from interface: StoppingCondition
Determines the percentage complete for the associated algorithm.

Specified by:
getPercentageCompleted in interface StoppingCondition

isCompleted

public boolean isCompleted()
Description copied from interface: StoppingCondition
Determines whether the stopping condition has been satisfied (equivalent to StoppingCondition.getPercentageCompleted() == 1.0 but may be more efficient).

Specified by:
isCompleted in interface StoppingCondition
Returns:
true when condition is satisfied, false otherwise

setAlgorithm

public void setAlgorithm(Algorithm algorithm)
Description copied from interface: StoppingCondition
Sets the algorithm that this stopping condition should be applied to. Called by 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).

Specified by:
setAlgorithm in interface StoppingCondition
Parameters:
algorithm - The applicable Algorithm.


Copyright © 2009 CIRG. All Rights Reserved.