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

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

public class SimpleMutator<T extends Chromosome>
extends Mutator<T>

A simple mutation operator. It performes the simplest mutation algorithm according to a specified probability. A chromosome position is randomly chosen and its gene randomized.

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.Mutator
Mutator.Statistics
 
Field Summary
 
Fields inherited from class jenes.stage.operator.Mutator
probability
 
Fields inherited from class jenes.stage.operator.Operator
random, statistics
 
Fields inherited from class jenes.stage.AbstractStage
biggerIsBetter, ga
 
Constructor Summary
SimpleMutator(double probability)
          Constructs a new simple mutator with the specified probability
 
Method Summary
protected  void mutate(Individual<T> ind)
          Mutates a single individual.
 
Methods inherited from class jenes.stage.operator.Mutator
getProbability, process, setProbability
 
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

SimpleMutator

public SimpleMutator(double probability)
Constructs a new simple mutator with the specified probability

Parameters:
probability - the mutation probability
Method Detail

mutate

protected void mutate(Individual<T> ind)
Description copied from class: Mutator
Mutates a single individual. This abstract method is implemented according to a mutation policy

Specified by:
mutate in class Mutator<T extends Chromosome>
Parameters:
ind - the individual to mutate