Class RandomKeyMutation

  • All Implemented Interfaces:
    MutationPolicy

    public class RandomKeyMutation
    extends java.lang.Object
    implements MutationPolicy
    Mutation operator for RandomKeys. Changes a randomly chosen element of the array representation to a random value uniformly distributed in [0,1].
    Since:
    2.0
    Version:
    $Revision: 983921 $ $Date: 2010-08-10 12:46:06 +0200 (mar. 10 août 2010) $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Chromosome mutate​(Chromosome original)
      Mutate the given chromosome.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RandomKeyMutation

        public RandomKeyMutation()
    • Method Detail

      • mutate

        public Chromosome mutate​(Chromosome original)
        Mutate the given chromosome.
        Specified by:
        mutate in interface MutationPolicy
        Parameters:
        original - the original chromosome.
        Returns:
        the mutated chromomsome.
        Throws:
        java.lang.IllegalArgumentException - if original is not a RandomKey instance