Interface RateMatrix

  • All Superinterfaces:
    java.lang.Cloneable, java.io.Serializable
    All Known Implementing Classes:
    AbstractRateMatrix, AminoAcidModel, WAG

    public interface RateMatrix
    extends java.lang.Cloneable, java.io.Serializable
    abstract base class for all rate matrices
    Version:
    $Id: RateMatrix.java 185 2006-01-23 23:03:18Z rambaut $
    Author:
    Korbinian Strimmer, Alexei Drummond, Matthew Goode
    • Method Detail

      • getUniqueName

        java.lang.String getUniqueName()
        Returns:
        a short unique human-readable identifier for this rate matrix.
      • getDimension

        int getDimension()
        Returns:
        the dimension of this rate matrix.
      • getEquilibriumFrequencies

        double[] getEquilibriumFrequencies()
        Returns:
        stationary frequencies (sum = 1.0)
      • getEquilibriumFrequency

        double getEquilibriumFrequency​(int i)
        Returns:
        stationary frequency (sum = 1.0) for ith state Preferred method for infrequent use.
      • getSequenceType

        SequenceType getSequenceType()
        Get the data type of this rate matrix
      • getRelativeRates

        double[][] getRelativeRates()
        Returns:
        rate matrix (transition: from 1st index to 2nd index)
      • getTransitionProbability

        double getTransitionProbability​(int fromState,
                                        int toState)
        Parameters:
        fromState - The state from which we are starting
        toState - The resulting state
        Returns:
        the probability of going from one state to another given the current distance
      • getTransitionProbabilities

        void getTransitionProbabilities​(double[][] probabilityStore)
        A utility method for speed, transfers trans prob information quickly into store.
      • setDistance

        void setDistance​(double distance)
        Sets the distance (such as time/branch length) used when calculating the probabilities. This method may well take the most time!