JGAP

examples.dynamicMutation
Class DynamicMutationExample.CoinsMutationRateCalc

java.lang.Object
  extended by examples.dynamicMutation.DynamicMutationExample.CoinsMutationRateCalc
All Implemented Interfaces:
java.io.Serializable, IUniversalRateCalculator
Enclosing class:
DynamicMutationExample

public static class DynamicMutationExample.CoinsMutationRateCalc
extends java.lang.Object
implements IUniversalRateCalculator

This class only is an experiment!

Since:
2.6
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jgap.IUniversalRateCalculator
CVS_REVISION
 
Constructor Summary
DynamicMutationExample.CoinsMutationRateCalc()
           
 
Method Summary
 int calculateCurrentRate()
          Calculates the required dynamic rate.
 boolean toBePermutated(IChromosome a_chrom, int a_geneIndex)
          Calculates whether a mutation should be carried out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMutationExample.CoinsMutationRateCalc

public DynamicMutationExample.CoinsMutationRateCalc()
Method Detail

calculateCurrentRate

public int calculateCurrentRate()
Description copied from interface: IUniversalRateCalculator
Calculates the required dynamic rate.

Specified by:
calculateCurrentRate in interface IUniversalRateCalculator
Returns:
the currently applying mutation rate.

toBePermutated

public boolean toBePermutated(IChromosome a_chrom,
                              int a_geneIndex)
Description copied from interface: IUniversalRateCalculator
Calculates whether a mutation should be carried out.

Specified by:
toBePermutated in interface IUniversalRateCalculator
Returns:
flag indicating whether mutation should be performed

JGAP