mss.ea.trm
Class MaxGenTermination
java.lang.Object
|
+--mss.ea.trm.Termination
|
+--mss.ea.trm.MaxGenTermination
- All Implemented Interfaces:
- Condition
- public class MaxGenTermination
- extends Termination
Termination after reaching a specified number of generations.
The break condition is fulfilled in case of ( current number of generations > maximal number of generations).
The maximal number is specified in the constructor. To gather information about the number of generations it
is necessary to specify a statistic operator.
- Since:
- 0.1
- Version:
- 0.1 (06-11-2001)
- Author:
- Andreas Rummler
Field Summary |
protected long |
breakValue
Maximal number of generations. |
protected Counter |
counter
Generation counter to use for break condition testing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
breakValue
protected long breakValue
- Maximal number of generations.
counter
protected Counter counter
- Generation counter to use for break condition testing.
MaxGenTermination
public MaxGenTermination(long generations)
- Constructor with maximal number of generations.
- Parameters:
generations
- maximal number of generations
MaxGenTermination
public MaxGenTermination(long generations,
Counter c)
- Constructor with maximal number of generations and counter to gather information from.
- Parameters:
generations
- maximal number of generationsc
- counter with current number of generations
MaxGenTermination
public MaxGenTermination(long generations,
AbstractPopulation p)
- Constructor with maximal number of generations and appropriate population.
- Parameters:
generations
- maximal number of generationsp
- population to use for break condition testing
setCounter
public void setCounter(Counter c)
- Sets the generation counter.
- Parameters:
c
- new generation counter
isTrue
public boolean isTrue()
- Test of break condition.
- Overrides:
isTrue
in class Termination
- Returns:
- result of the test of break condition
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS