pal.mep
Class MutationRateModel

java.lang.Object
  |
  +--pal.mep.MutationRateModel
All Implemented Interfaces:
java.lang.Cloneable, Parameterized, Report, java.io.Serializable, Summarizable, Units
Direct Known Subclasses:
ConstantMutationRate, SteppedMutationRate, WindowedMutationRate

public abstract class MutationRateModel
extends java.lang.Object
implements Units, Parameterized, Report, java.lang.Cloneable, java.io.Serializable, Summarizable

This abstract class contains methods that are of general use for modelling mutation rate changes over time.

See Also:
Serialized Form

Field Summary
protected  FormattedOutput fo
           
 
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, YEARS
 
Constructor Summary
MutationRateModel()
           
 
Method Summary
abstract  java.lang.Object clone()
           
abstract  double getExpectedSubstitutions(double t)
          Returns integral of mutation rate function (= integral mu(x) dx from 0 to t).
 double getExpectedSubstitutions(double start, double finish)
          Calculates the integral 1/mu(x) dx between start and finish.
abstract  double getMutationRate(double t)
          Gets the mutation rate, value of mu(t) at time t.
abstract  double getTime(double expectedSubs)
          Return the time at which expected substitutions has occurred.
 int getUnits()
          returns units of measurement.
abstract  void scale(double scale)
          Linearly scales this mutation rate model.
 void setUnits(int u)
          sets units of measurement.
abstract  java.lang.String toSingleLine()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pal.misc.Parameterized
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE
 
Methods inherited from interface pal.misc.Report
report
 
Methods inherited from interface pal.misc.Summarizable
getSummaryTypes, getSummaryValue
 

Field Detail

fo

protected FormattedOutput fo
Constructor Detail

MutationRateModel

public MutationRateModel()
Method Detail

clone

public abstract java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getMutationRate

public abstract double getMutationRate(double t)
Gets the mutation rate, value of mu(t) at time t.

getExpectedSubstitutions

public abstract double getExpectedSubstitutions(double t)
Returns integral of mutation rate function (= integral mu(x) dx from 0 to t).

getTime

public abstract double getTime(double expectedSubs)
Return the time at which expected substitutions has occurred.

scale

public abstract void scale(double scale)
Linearly scales this mutation rate model.
Parameters:
scale - getExpectedSubstitutions should return scale instead of 1.0 at time t.

getExpectedSubstitutions

public double getExpectedSubstitutions(double start,
                                       double finish)
Calculates the integral 1/mu(x) dx between start and finish.

setUnits

public void setUnits(int u)
sets units of measurement.
Parameters:
u - units

getUnits

public int getUnits()
returns units of measurement.

toSingleLine

public abstract java.lang.String toSingleLine()