es.udc.gii.common.eaf.algorithm.operator.selection
Class SelectionOperator

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
All Implemented Interfaces:
Operator, Configurable
Direct Known Subclasses:
DeterministicTournamentSelection, ExtintionOperator, LinearRankingSelection, TournamentSelection, UniformSelection

public abstract class SelectionOperator
extends java.lang.Object
implements Operator

This abstract class represents a selection operator.

The behavior of a selection operator is to select the individuals of the population that will be used during the reproduction phase.

The classes that extend this operator will implement the method #select(EvolutionaryAlgorithm algorithm, List individuals). This method receives a list of individuals and return a selected individual. This method is executed from the method operate(EvolutionaryAlgorithm algorithm, List individuals) until the children population is filled.

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Constructor Summary
SelectionOperator()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
 java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
          Execute this operator over a group of individuals.
protected abstract  Individual select(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectionOperator

public SelectionOperator()
Method Detail

operate

public java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm,
                                          java.util.List<Individual> individuals)
                                   throws OperatorException
Description copied from interface: Operator
Execute this operator over a group of individuals. This method will be invoked by the current algorithm during its execution. It will be applied on a list of individuals and will return a list of modified individuals.

This method will recive two parameters. The current algorithm, to visit it if it is necessary, for example, to get some parameter of the current execution. And a list of individuals on wich we will apply this operator.

Specified by:
operate in interface Operator
Parameters:
algorithm - the current algorithm, to visit when it is necessary.
individuals - list of individuals on wich we will apply the operator.
Returns:
the result of apply this operator to a individuals' lisr.
Throws:
OperatorException - when occurs some type of error during the execution of this operator.

select

protected abstract Individual select(EvolutionaryAlgorithm algorithm,
                                     java.util.List<Individual> individuals)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Specified by:
configure in interface Configurable
Parameters:
conf - a Configuration object.
See Also:
Configuration