gpalta.ops
Class IndSelectorTournament

java.lang.Object
  extended by gpalta.ops.IndSelector
      extended by gpalta.ops.IndSelectorTournament

public class IndSelectorTournament
extends IndSelector

Implements Tournament selection. Assumes populationSize mod tournamentSize = 0


Constructor Summary
IndSelectorTournament(Config config)
           
 
Method Summary
<T extends Individual>
java.util.List<T>
select(java.util.List<T> population)
          Performs the selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndSelectorTournament

public IndSelectorTournament(Config config)
Method Detail

select

public <T extends Individual> java.util.List<T> select(java.util.List<T> population)
Performs the selection

Specified by:
select in class IndSelector
Parameters:
population - A list of Trees from where to select the individuals
Returns:
A new list of Trees with the selected individuals. If a Tree is selected more than once, each instance of that Tree will be a totally independant individual (no other Trees will be modified when modifying that Tree)