es.udc.gii.common.eaf.algorithm.operator.reproduction.mutation
Class MutationOperator

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.reproduction.ReproductionOperator
      extended by es.udc.gii.common.eaf.algorithm.operator.reproduction.mutation.MutationOperator
All Implemented Interfaces:
Operator, Configurable
Direct Known Subclasses:
DEMutationOperator, DoubleRandomMutation, EvolutionaryStrategyMutation, GaussianMutation, MichalewiczNonUniformMutation, MOPMutation, SwapMutation

public abstract class MutationOperator
extends ReproductionOperator

This abstract class represents a mutaiton operator.

The behavior of a mutation operator is to mutate the selected individuals of the population.

The classes that extend this operator will implement the method #mutation(EvolutionaryAlgorithm algorithm, List individuals). This method receives a list of individuals and return the mutated. This method is executed from the method operate(EvolutionaryAlgorithm algorithm, List individuals) for each of the individuals of the list.

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

Field Summary
private  double probability
           
 
Constructor Summary
MutationOperator()
           
MutationOperator(int probability)
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
 double getProbability()
           
protected abstract  java.util.List<Individual> mutation(EvolutionaryAlgorithm algorithm, Individual individual)
           
 java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
          Execute this operator over a group of individuals.
 void setProbability(int probability)
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.reproduction.ReproductionOperator
checkBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

probability

private double probability
Constructor Detail

MutationOperator

public MutationOperator()

MutationOperator

public MutationOperator(int probability)
Method Detail

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
Overrides:
configure in class ReproductionOperator
Parameters:
conf - a Configuration object.
See Also:
Configuration

getProbability

public double getProbability()

setProbability

public void setProbability(int probability)

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.

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.

mutation

protected abstract java.util.List<Individual> mutation(EvolutionaryAlgorithm algorithm,
                                                       Individual individual)