jenes.stage
Class BreakPoint<T extends Chromosome>

java.lang.Object
  extended by jenes.stage.AbstractStage<T>
      extended by jenes.stage.BreakPoint<T>
Type Parameters:
T - The class chromosomes flowing across the stage.

public class BreakPoint<T extends Chromosome>
extends AbstractStage<T>

Stage representing a break point. It notifies its listeners when its process(Population, Population) method is invocated. The population isn't alterated so the output population is equals to the input one.

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

Nested Class Summary
static class BreakPoint.Listener
          Abstract class representing a break point listener.
 
Field Summary
 
Fields inherited from class jenes.stage.AbstractStage
biggerIsBetter, ga
 
Constructor Summary
BreakPoint()
          Constructs a new BreakPoint stage
 
Method Summary
 void add(BreakPoint.Listener listener)
          Adds the specified listener at this break point stage
 void process(Population<T> in, Population<T> out)
          Processes the input population and tranforms it into the output population.
 void remove(BreakPoint.Listener listener)
          Removes the specified listener between the ones
 
Methods inherited from class jenes.stage.AbstractStage
dispose, init, isBiggerBetter, setBiggerIsBetter, setBiggerIsBetter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreakPoint

public BreakPoint()
Constructs a new BreakPoint stage

Method Detail

add

public void add(BreakPoint.Listener listener)
Adds the specified listener at this break point stage

Parameters:
listener - the listener to notify when the break point process time occurs.

remove

public void remove(BreakPoint.Listener listener)
Removes the specified listener between the ones

Parameters:
listener - the listener to remove

process

public void process(Population<T> in,
                    Population<T> out)
             throws StageException
Description copied from class: AbstractStage
Processes the input population and tranforms it into the output population. Note: - Out population is made of recicled individuals. There is a need of new individuals to add only when there is a need to increase the population size. For pre-initalized individual just use setAs method. This is done for an efficient memory management. - A stage can modify the input population. So input passed to process method can be mutated when the process method ends.

Specified by:
process in class AbstractStage<T extends Chromosome>
Parameters:
in - the input population
out - the output population
Throws:
StageException