Package pal.mep

Class MutationRateModel

    • Constructor Detail

      • MutationRateModel

        protected MutationRateModel​(int units,
                                    double maximumMutationRate)
    • 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 double getTime​(double expectedSubs)
        Return the time at which expected substitutions has occurred.
      • getEndTime

        public abstract double getEndTime​(double expectedSubs,
                                          double startTime)
        Return the end time at which expected substitutions has occurred, given we start at start time
      • 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.
      • scale

        public TimeOrderCharacterData scale​(TimeOrderCharacterData toScale)
        Returns:
        a TimeOrderCharacterData scaled to use EXPECTED_SUBSTITUTIONS based on this MutationRateModel
        Throws:
        java.lang.IllegalArgumentException - if units of this Model doenot match the units of the TimeOrderCharacterData object (toScale).
      • setUnits

        public final void setUnits​(int u,
                                   double maximumMutationRate)
        sets units of measurement.
        Parameters:
        u - units
        the - maximumMutationRate that is allowable, given the units. This needs to be given intelligently.
        Throws:
        java.lang.IllegalArgumentException - if units are ExpectedSubstitutions
      • getMaximumMutationRate

        protected final double getMaximumMutationRate()
        Returns:
        the maximum mutation rate as indicated by the user
      • getUnits

        public int getUnits()
        returns units of measurement.
      • getOrthogonalHints

        public OrthogonalHints getOrthogonalHints()
        Overide if there is any orthogonal hint information available
        Returns:
        null
      • toSingleLine

        public abstract java.lang.String toSingleLine()