jebl.evolution.substmodel
Class MatrixExponential

java.lang.Object
  extended by jebl.evolution.substmodel.MatrixExponential
All Implemented Interfaces:
Serializable, Cloneable

public class MatrixExponential
extends Object
implements Cloneable, Serializable

compute matrix exponential and, subsequently, transition probabilities for a given rate matrix

Author:
Korbinian Strimmer
See Also:
Serialized Form

Constructor Summary
MatrixExponential(int dimension)
           
MatrixExponential(RateMatrix r)
          create module
 
Method Summary
 int getDimension()
           
 void getTransitionProbabilities(double[][] probabilityStore)
          A utility method for speed, transfers trans prob information quickly into store
 double getTransitionProbability(int from, int to)
           
 void setDistance(double arc)
          compute transition probabilities for a expected distance using the prespecified rate matrix
 void setDistanceTranspose(double arc)
          compute transition probabilities for a expected distance using the prespecified rate matrix.
 void setMatrix(RateMatrix r)
          update rate matrix used in present module
 void updateByRelativeRates(double[][] relativeRates)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixExponential

public MatrixExponential(int dimension)

MatrixExponential

public MatrixExponential(RateMatrix r)
create module

Parameters:
r - rate matrix
Method Detail

getTransitionProbability

public final double getTransitionProbability(int from,
                                             int to)

getDimension

public int getDimension()

updateByRelativeRates

public void updateByRelativeRates(double[][] relativeRates)

setMatrix

public void setMatrix(RateMatrix r)
update rate matrix used in present module

Parameters:
r - rate matrix

getTransitionProbabilities

public final void getTransitionProbabilities(double[][] probabilityStore)
A utility method for speed, transfers trans prob information quickly into store


setDistance

public final void setDistance(double arc)
compute transition probabilities for a expected distance using the prespecified rate matrix

Parameters:
arc - expected distance

setDistanceTranspose

public final void setDistanceTranspose(double arc)
compute transition probabilities for a expected distance using the prespecified rate matrix. The resulting matrix works [to][from] as opposed to [from][to]

Parameters:
arc - expected distance