|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pal.substmodel.CachedRateMatrix
a cached rate matrix. This model caches transition probabilities by distance in order to increase speed of likelihood calculations for repeated calls with same/similar branch lengths.
Constructor Summary | |
CachedRateMatrix(CachedRateMatrix cachedRateMatrix)
|
|
CachedRateMatrix(RateMatrix rateMatrix,
DoubleKeyCache cache)
|
|
CachedRateMatrix(RateMatrix rateMatrix,
int maxCacheSize)
|
Method Summary | |
void |
addPalObjectListener(PalObjectListener pol)
Add a PalObjectListener to be notified of changes to the model. |
java.lang.Object |
clone()
A non shallow implementation of clone() |
DataType |
getDataType()
Get the data type of this rate matrix |
double |
getDefaultValue(int n)
get default value of parameter |
int |
getDimension()
|
double[] |
getEquilibriumFrequencies()
|
double |
getEquilibriumFrequency(int i)
|
double |
getLowerLimit(int n)
get lower parameter limit |
int |
getModelID()
get numerical code describing the model type |
int |
getNumParameters()
get number of parameters |
double |
getParameter(int n)
get model parameter |
java.lang.String |
getParameterName(int i)
|
double[][] |
getRelativeRates()
|
void |
getTransitionProbabilities(double[][] probs)
A utility method for speed, transfers trans prob information quickly into store |
double |
getTransitionProbability(int i,
int j)
get transition probability for the preselected model and the previously specified distance |
int |
getTypeID()
get numerical code describing the data type |
java.lang.String |
getUniqueName()
|
double |
getUpperLimit(int n)
get upper parameter limit |
void |
parametersChanged(PalObjectEvent pe)
Signifies that parametric valued governing the state of this Object have changed. |
void |
removePalObjectListener(PalObjectListener pol)
|
void |
report(java.io.PrintWriter out)
print human readable report (e.g., on parameters and associated model) |
void |
setDistance(double k)
set distance and corresponding computation transition probabilities |
void |
setParameter(double param,
int n)
set model parameter |
void |
setParameterSE(double paramSE,
int n)
set standard errors for model parameter |
void |
structureChanged(PalObjectEvent pe)
Signifies that the structure of the object has changed (for example in trees to topology has changed) |
java.lang.String |
toString()
Return string representation of substitution model. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CachedRateMatrix(RateMatrix rateMatrix, DoubleKeyCache cache)
model
- the underlying substitution modelcache
- the caching method usedpublic CachedRateMatrix(RateMatrix rateMatrix, int maxCacheSize)
model
- the underlying substitution modelpublic CachedRateMatrix(CachedRateMatrix cachedRateMatrix)
model
- the previous cached model.Method Detail |
public final void report(java.io.PrintWriter out)
Report
report
in interface Report
pal.misc.Report
out
- output streampublic final int getTypeID()
RateMatrix
getTypeID
in interface RateMatrix
pal.substmodel.RateMatrix
public final int getModelID()
RateMatrix
getModelID
in interface RateMatrix
pal.substmodel.RateMatrix
public final int getDimension()
getDimension
in interface RateMatrix
pal.substmodel.RateMatrix
public final double[] getEquilibriumFrequencies()
getEquilibriumFrequencies
in interface RateMatrix
pal.substmodel.RateMatrix
public final double getEquilibriumFrequency(int i)
getEquilibriumFrequency
in interface RateMatrix
pal.substmodel.RateMatrix
public final double[][] getRelativeRates()
getRelativeRates
in interface RateMatrix
pal.substmodel.RateMatrix
public java.lang.String toString()
toString
in class java.lang.Object
public final int getNumParameters()
Parameterized
getNumParameters
in interface Parameterized
pal.misc.Parameterized
public final void setParameter(double param, int n)
Parameterized
setParameter
in interface Parameterized
pal.misc.Parameterized
param
- parameter valuen
- parameter numberpublic final double getParameter(int n)
Parameterized
getParameter
in interface Parameterized
pal.misc.Parameterized
n
- parameter numberpublic final void setParameterSE(double paramSE, int n)
Parameterized
setParameterSE
in interface Parameterized
pal.misc.Parameterized
paramSE
- standard error of parameter valuen
- parameter numberpublic final double getLowerLimit(int n)
Parameterized
getLowerLimit
in interface Parameterized
pal.misc.Parameterized
n
- parameter numberpublic final double getUpperLimit(int n)
Parameterized
getUpperLimit
in interface Parameterized
pal.misc.Parameterized
n
- parameter numberpublic final double getDefaultValue(int n)
Parameterized
getDefaultValue
in interface Parameterized
pal.misc.Parameterized
n
- parameter numberpublic final java.lang.String getParameterName(int i)
getParameterName
in interface NamedParameterized
pal.misc.NamedParameterized
public final void setDistance(double k)
setDistance
in interface RateMatrix
k
- distancepublic final double getTransitionProbability(int i, int j)
getTransitionProbability
in interface RateMatrix
i
- start statej
- end statepublic final void getTransitionProbabilities(double[][] probs)
RateMatrix
getTransitionProbabilities
in interface RateMatrix
public final java.lang.Object clone()
clone
in interface RateMatrix
clone
in class java.lang.Object
public final DataType getDataType()
RateMatrix
getDataType
in interface RateMatrix
public final java.lang.String getUniqueName()
getUniqueName
in interface RateMatrix
pal.substmodel.RateMatrix
public void structureChanged(PalObjectEvent pe)
PalObjectListener
structureChanged
in interface PalObjectListener
public void parametersChanged(PalObjectEvent pe)
PalObjectListener
parametersChanged
in interface PalObjectListener
public void addPalObjectListener(PalObjectListener pol)
RateMatrix
addPalObjectListener
in interface RateMatrix
public void removePalObjectListener(PalObjectListener pol)
removePalObjectListener
in interface RateMatrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |