jenes
Interface GenerationEventListener<T extends Chromosome>

Type Parameters:
T - extends Chromosome
All Known Implementing Classes:
PatternProblem

public 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.

Since:
1.0
Version:
1.2
Author:
Luigi Troiano, Pierpaolo Lombardi, Giuseppe Pascale, Thierry Bodhuin
See Also:
GeneticAlgorithm

Method Summary
 void onGeneration(GeneticAlgorithm<T> ga, long time)
          Invoked when at the end of one generation step
 

Method Detail

onGeneration

void onGeneration(GeneticAlgorithm<T> ga,
                  long time)
Invoked when at the end of one generation step

Parameters:
ga - the genetic algorithm generating the event
time - the event time expressed in milliseconds