public abstract class AbstractRateMatrix extends java.lang.Object implements RateMatrix, ExternalParameterListener
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils| Modifier and Type | Field and Description |
|---|---|
protected FormattedOutput |
format |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRateMatrix(int dim) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPalObjectListener(PalObjectListener pol)
Add a PalObjectListener to be notified of changes to the model.
|
java.lang.Object |
clone() |
protected void |
fireParametersChangedEvent() |
protected void |
fireParametersChangedEvent(PalObjectEvent pe) |
DataType |
getDataType()
Get the data type of this rate matrix
|
int |
getDimension() |
double[] |
getEquilibriumFrequencies() |
double |
getEquilibriumFrequency(int i) |
protected double[] |
getFrequencies() |
abstract int |
getModelID()
get numerical code describing the model type
|
OrthogonalHints |
getOrthogonalHints() |
double |
getParameter(int parameter)
get model parameter
|
double[][] |
getRelativeRates() |
void |
getTransitionProbabilities(double[][] probabilityStore)
A utility method for speed, transfers trans prob information quickly
into store
|
double |
getTransitionProbability(int fromState,
int toState)
Returns the probability of going from one state to another
given the current distance
|
int |
getTypeID()
get numerical code describing the data type
|
void |
parameterChanged(ParameterEvent pe)
For the external parameter interface.
|
protected void |
printFrequencies(java.io.PrintWriter out) |
void |
rebuild() |
protected abstract void |
rebuildRateMatrix(double[][] rate,
double[] parameters) |
void |
removePalObjectListener(PalObjectListener pol) |
void |
scale(double scale) |
protected void |
setDataType(DataType dt) |
void |
setDistance(double distance)
Sets the distance (such as time/branch length) used when calculating
the probabilities.
|
void |
setDistanceTranspose(double distance)
Sets the distance (such as time/branch length) used when calculating
the probabilities.
|
protected void |
setFrequencies(double[] f) |
void |
setParameter(double value,
int parameter)
set model parameter
|
void |
setParameters(double[] parameters) |
double |
setParametersNoScale(double[] parameters) |
protected void |
updateMatrixExp() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUniqueNamegetParameterNamegetDefaultValue, getLowerLimit, getNumParameters, getUpperLimit, setParameterSEprotected FormattedOutput format
public int getTypeID()
getTypeID in interface RateMatrixpublic abstract int getModelID()
getModelID in interface RateMatrixpublic int getDimension()
getDimension in interface RateMatrixpublic double[] getEquilibriumFrequencies()
getEquilibriumFrequencies in interface RateMatrixpublic double getEquilibriumFrequency(int i)
getEquilibriumFrequency in interface RateMatrixpublic DataType getDataType()
RateMatrixgetDataType in interface RateMatrixprotected final void setDataType(DataType dt)
public double[][] getRelativeRates()
getRelativeRates in interface RateMatrixpublic double getTransitionProbability(int fromState,
int toState)
getTransitionProbability in interface RateMatrixfromState - The state from which we are startingtoState - The resulting statepublic final void rebuild()
public final void setDistance(double distance)
setDistance in interface RateMatrixpublic final void setDistanceTranspose(double distance)
setDistanceTranspose in interface RateMatrixpublic final void getTransitionProbabilities(double[][] probabilityStore)
getTransitionProbabilities in interface RateMatrixpublic void scale(double scale)
scale in interface RateMatrixprotected void printFrequencies(java.io.PrintWriter out)
protected void setFrequencies(double[] f)
public double setParametersNoScale(double[] parameters)
setParametersNoScale in interface RateMatrixpublic void setParameters(double[] parameters)
public final void setParameter(double value,
int parameter)
ParameterizedsetParameter in interface Parameterizedvalue - parameter valueparameter - parameter numberpublic final double getParameter(int parameter)
ParameterizedgetParameter in interface Parameterizedparameter - parameter numberprotected abstract void rebuildRateMatrix(double[][] rate,
double[] parameters)
public void addPalObjectListener(PalObjectListener pol)
RateMatrixaddPalObjectListener in interface RateMatrixpublic void removePalObjectListener(PalObjectListener pol)
removePalObjectListener in interface RateMatrixprotected void fireParametersChangedEvent()
protected void fireParametersChangedEvent(PalObjectEvent pe)
protected void updateMatrixExp()
public void parameterChanged(ParameterEvent pe)
parameterChanged in interface ExternalParameterListenerpublic java.lang.Object clone()
clone in interface RateMatrixclone in class java.lang.Objectpublic OrthogonalHints getOrthogonalHints()
getOrthogonalHints in interface RateMatrixprotected final double[] getFrequencies()