Package jebl.evolution.substmodel

# Class MatrixExponential

java.lang.Object
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

Version:
  $Id: MatrixExponential.java 185 2006-01-23 23:03:18Z rambaut $
Author:
  Korbinian Strimmer
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`MatrixExponential(int dimension)`
`MatrixExponential(RateMatrix r)`
create module

## Method Summary

Modifier and Type
Method
Description
`int`
`getDimension()`
`final void`
`getTransitionProbabilities(double[][] probabilityStore)`
A utility method for speed, transfers trans prob information quickly into store
`final double`
`getTransitionProbability(int from, int to)`
`final void`
`setDistance(double arc)`
compute transition probabilities for a expected distance using the prespecified rate matrix
`final 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

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MatrixExponential

public MatrixExponential(int dimension)

### MatrixExponential

public MatrixExponential(RateMatrix r)
create module

Parameters:
  `r` - rate matrix

## Method Details

### 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