com.rubecula.darwin.core
Interface Mutator

All Known Implementing Classes:
Mutator_Abstract, Mutator_Null, Mutator_PepperedMoth, Mutator_TS

public interface Mutator

Defines the methods for gene and genotype mutators.

Author:
Robin

Method Summary
 Allele mutate(Allele allele)
          Method to take an allele and mutate it.
 Genotype mutate(Genotype genotype)
          Method to take a genotype and mutate it.
 

Method Detail

mutate

Allele mutate(Allele allele)
Method to take an allele and mutate it. For instance a gene might have one base pair copied incorrectly, thus giving rise to a new allele. In nature, this kind of mutation is rare. By contract, if the allele is unchanged, it will itself be returned.

Parameters:
allele - the original allele
Returns:
either the original allele or a mutated version of it. TODO it seems to me now that this mutation should operate on a Gene, not on an Allele, but there again we have to remember that the word "gene" is used in two different ways in common parlance.

mutate

Genotype mutate(Genotype genotype)
Method to take a genotype and mutate it. For instance, a genotype might be mutated if a sequence of genes is "accidentally" repeated, or skipped. In nature, this kind of mutation is exceptionally rare, but can be found, for example, in the different human sensistivities to Serotonin. See Matt Ridley's excellent book "Genome". By contract, if the allele is unchanged, it will itself be returned.

Parameters:
genotype - the original genotype
Returns:
either the original genotype or a mutated version of it.