net.sourceforge.cilib.problem.changestrategy
Class IterationBasedChangeStrategy

java.lang.Object
  extended by net.sourceforge.cilib.problem.changestrategy.IterationBasedChangeStrategy
All Implemented Interfaces:
ChangeStrategy

public class IterationBasedChangeStrategy
extends Object
implements ChangeStrategy

An IterationBasedChangeStrategy is a test to ensure that a problem is altered or changed at a predefined frequency.

The default behaviour is to return true for all iterations. ie: the frequency paramater resolution is set to have a value of 1.0.

Author:
gpampara
See Also:
ControlParameter

Constructor Summary
IterationBasedChangeStrategy()
          Create a new instance.
 
Method Summary
 boolean shouldApply(Problem problem)
          Determine if a change should be applied to the current problem, based on the current number of iterations that have been completed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterationBasedChangeStrategy

public IterationBasedChangeStrategy()
Create a new instance.

Method Detail

shouldApply

public boolean shouldApply(Problem problem)
Determine if a change should be applied to the current problem, based on the current number of iterations that have been completed.

Specified by:
shouldApply in interface ChangeStrategy
Parameters:
problem - The problem to query.
Returns:
true if a change should be performed, false otherwise.


Copyright © 2009 CIRG. All Rights Reserved.