com.rubecula.darwin.domain.helper
Interface Mutator

All Superinterfaces:
net.sf.tostring0.Identifiable
All Known Implementing Classes:
Mutator_, Mutator_Null, Mutator_PepperedMoth, Mutator_Random, Mutator_TS

public interface Mutator
extends net.sf.tostring0.Identifiable

Defines the methods for gene and genome mutators. Mutation may occur in one of the following ways:

TODO Allow for other types of mutation, perhaps using a list of Mutators

Author:
Robin Hillyard

Method Summary
 boolean isIdentity()
           
 Allele mutate(Allele allele)
          Method to take an allele and mutate it.
 Genome mutate(Genome genome)
          Method to take a genome and mutate it.
 void normalize(Genome genome, Genome reference)
          Normalize the given genome with respect to the reference genome.
 boolean simplify(Genome genome)
          Simplify the genome, typically by removing any non-functional groups of genes.
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

isIdentity

boolean isIdentity()
Returns:
true if this mutator does not actually change anything

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

Genome mutate(Genome genome)
Method to take a genome and mutate it. For instance, a genome 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 sensitivities to Serotonin. See Matt Ridley's excellent book "Genomic". By contract, if the allele is unchanged, it will itself be returned.

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

normalize

void normalize(Genome genome,
               Genome reference)
Normalize the given genome with respect to the reference genome. For example, if genome and reference are identical to start with, genome will be modified such that it is now empty. This is particularly useful in asexual systems.

Parameters:
genome -
reference -

simplify

boolean simplify(Genome genome)
Simplify the genome, typically by removing any non-functional groups of genes. After simplification, expression should be identical with the expression before simplification.

Parameters:
genome - TODO consider narrowing to Genotype
Returns:
true if the genome has changed as a result of simplification.


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.