|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- extends Chromosomepublic interface GenerationEventListener<T extends Chromosome>
A listener of the genetic algorithm generation event. Such a listener is notified after a generation step is executed.
A GenerationEventListener
is registered to the algorithm by the method GeneticAlgorithm.addGenerationEventListener(GenerationEventListener)
.
The listener is removed by invoking the method GeneticAlgorithm.removeGenerationEventListener(GenerationEventListener)
.
A GenerationEventListener
can be registered to multiple different algorithms, thus being notified by all of them.
Another way to get notified of algorithms events is to override method GeneticAlgorithm.onGeneration(long)
when subclassing the GeneticAlgorithm
class.
GeneticAlgorithm
Method Summary | |
---|---|
void |
onGeneration(GeneticAlgorithm<T> ga,
long time)
Invoked when at the end of one generation step |
Method Detail |
---|
void onGeneration(GeneticAlgorithm<T> ga, long time)
ga
- the genetic algorithm generating the eventtime
- the event time expressed in milliseconds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |