Package pal.substmodel
Interface RateMatrix
- All Superinterfaces:
Cloneable,NamedParameterized,Parameterized,Report,Serializable
- All Known Implementing Classes:
AbstractRateMatrix,AminoAcidModel,BLOSUM62,CachedRateMatrix,CodonModel,CPREV,Dayhoff,F81,F84,GTR,HKY,JTT,MTREV24,NucleotideModel,TN,TwoStateModel,VT,WAG,YangCodonModel
abstract base class for all rate matrices
- Version:
- $Id: RateMatrix.java,v 1.34 2003/11/13 04:05:39 matt Exp $
- Author:
- Korbinian Strimmer, Alexei Drummond, Matthew Goode
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a PalObjectListener to be notified of changes to the model.clone()Get the data type of this rate matrixintdouble[]doublegetEquilibriumFrequency(int i) intget numerical code describing the model typedouble[][]Deprecated.try not to use.voidgetTransitionProbabilities(double[][] probabilityStore) A utility method for speed, transfers trans prob information quickly into storedoublegetTransitionProbability(int fromState, int toState) intget numerical code describing the data typevoidvoidscale(double scaleValue) voidsetDistance(double distance) Sets the distance (such as time/branch length) used when calculating the probabilities.voidsetDistanceTranspose(double distance) Sets the distance (such as time/branch length) used when calculating the probabilities.doublesetParametersNoScale(double[] parameters) Methods inherited from interface pal.misc.NamedParameterized
getParameterNameMethods inherited from interface pal.misc.Parameterized
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE
-
Method Details
-
getTypeID
int getTypeID()get numerical code describing the data type- Returns:
- integer code identifying a data type
-
getModelID
int getModelID()get numerical code describing the model type- Returns:
- integer code identifying a substitution model
-
getUniqueName
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.
-
getDataType
DataType getDataType()Get the data type of this rate matrix -
getRelativeRates
double[][] getRelativeRates()Deprecated.try not to use.- 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 startingtoState- 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! -
setDistanceTranspose
void setDistanceTranspose(double distance) Sets the distance (such as time/branch length) used when calculating the probabilities. -
addPalObjectListener
Add a PalObjectListener to be notified of changes to the model. Only the parametersChanged method will generally be called -
removePalObjectListener
-
getOrthogonalHints
OrthogonalHints getOrthogonalHints()- Returns:
- an orthogonal hints object for orthogonal optimisation (may return null for no hints)
-
clone
Object clone() -
setParametersNoScale
double setParametersNoScale(double[] parameters) -
scale
void scale(double scaleValue)
-