jenes.stage.operator.common
Class RouletteWheelSelector<T extends Chromosome>

java.lang.Object
  extended by jenes.stage.AbstractStage<T>
      extended by jenes.stage.operator.Operator<T>
          extended by jenes.stage.operator.Selector<T>
              extended by jenes.stage.operator.common.RouletteWheelSelector<T>
Type Parameters:
T - The class of chromosomes to work with.

public class RouletteWheelSelector<T extends Chromosome>
extends Selector<T>

A classic roulette wheel selection operator. If s if the input population size, s individuals will be selected. The best ones have a higher selection probability. A preSelect(Population) method is useful to set up the selection state according to the population state to undergo at the selection process.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class jenes.stage.operator.Selector
Selector.Statistics
 
Field Summary
 
Fields inherited from class jenes.stage.operator.Selector
DEFAULT_MAX_ILLEGAL_RATE
 
Fields inherited from class jenes.stage.operator.Operator
random, statistics
 
Fields inherited from class jenes.stage.AbstractStage
biggerIsBetter, ga
 
Constructor Summary
RouletteWheelSelector()
           
 
Method Summary
protected  void preSelect(Population<T> pop)
          Sets up the selection state according a population's state.
protected  Individual<T> select(Population<T> pop)
          Selects a population according to a politics of selection.
 
Methods inherited from class jenes.stage.operator.Selector
getMaxIllegalRate, process, setMaxIllegalRate
 
Methods inherited from class jenes.stage.operator.Operator
getStatistics, updateStatistics
 
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

RouletteWheelSelector

public RouletteWheelSelector()
Method Detail

preSelect

protected void preSelect(Population<T> pop)
Description copied from class: Selector
Sets up the selection state according a population's state. It's invoked at the start of individuals selection of the specified population.

Overrides:
preSelect in class Selector<T extends Chromosome>
Parameters:
pop - the population to process by the stage

select

protected Individual<T> select(Population<T> pop)
Description copied from class: Selector
Selects a population according to a politics of selection.

Specified by:
select in class Selector<T extends Chromosome>
Parameters:
pop - the population in which to choose the individual
Returns:
the position selected