org.aisb.bio.things.evolution
Class Mutator
java.lang.Object
org.aisb.bio.things.evolution.Mutator
- public class Mutator
- extends java.lang.Object
Turn one nucleotide into another, maybe.
This implements a very simple Jukes-Cantor model of mutation. Configure it with a
mutation rate. Feed in a nucleotide. If there's no mutation, you'll get the same
nucleotide out. If there's a mutaiton, you'll get a different nucleotide, with each
possibility having equal odds.
- Author:
- Doug DeJulio
Constructor Summary |
Mutator(double probability)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Mutator
public Mutator(double probability)
mutate
public Monomer mutate(Monomer oldNucleotide)
- Perform the mutation.
- Parameters:
oldNucleotide
- The nucleotide to (perhaps) be mutated.
- Returns:
- The resulting nucleotide.
getMu
public double getMu()
- Returns:
- Returns the mutation probability.
setMu
public void setMu(double mu)
- Parameters:
mu
- The mutation probability to set.