|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.eval.ConditionalProbabilityStore
Title: ConditionalProbabilityStore (was ConditionalLikelihoodStore)
Description: A container class for various bits of data relating to the conditional likelihood. Things stored include the conditional likelihood, an scale factors and whether the current conditional likelihoods were created from cached data.
Nested Class Summary | |
static interface |
ConditionalProbabilityStore.ExtraProcessor
|
Constructor Summary | |
ConditionalProbabilityStore(int numberOfCategories,
int numberOfStates)
|
|
ConditionalProbabilityStore(int numberOfCategories,
int numberOfStates,
ConditionalProbabilityStore.ExtraProcessor extraProcessor)
|
Method Summary | |
double[][] |
calculateCategoryPatternConditionalProbabilities(double[] categoryProbabilities,
double[] equilibriumFrequencies,
int numberOfPatterns)
Calculate the conditional probabilities for each ancestral state at each site pattern, multiplied by related equilibrium frequencies |
double |
calculateLogLikelihood(double[] categoryProbabilities,
double[] equilibriumFrequencies,
int numberOfPatterns)
|
double |
calculateLogLikelihood(double[] categoryProbabilities,
double[] equilibriumFrequencies,
int[] patternWeights,
int numberOfPatterns)
|
double[] |
calculatePatternLogLikelihoods(double[] categoryProbabilities,
double[] equilibriumFrequencies,
int numberOfPatterns)
|
double[][][] |
getConditionalProbabilityAccess(int numberOfPatterns,
boolean resultsBasedOnCachedData)
Use this when access the internal conditional likelihood store for the purpose of changing the contents. |
double[][][] |
getConditionalProbabilityAccessNoChangeData(int numberOfPatterns,
boolean resultsBasedOnCachedData)
Use this when access the internal conditional likelihood store for the purpose of changing the contents. |
ConditionalProbabilityStore |
getCopy()
Cloning |
double[][][] |
getCurrentConditionalProbabilities()
Used for getting access to the internal conditional probability store when the data is not to be directly changed. |
double[][] |
getCurrentConditionalProbabilities(int category)
Used for getting access to the internal conditional probability store when the data is not to be directly changed. |
ConditionalProbabilityStore.ExtraProcessor |
getExtraProcessor()
|
double[][][] |
getIncompleteConditionalProbabilityAccess(int numberOfPatterns,
boolean resultsBasedOnCachedData,
boolean fix)
Use this when access the internal conditional likelihood store for the purpose of changing the contents. |
int |
getPatternCapacity()
|
boolean |
isBasedOnCachedData()
|
boolean |
isHasExtraProcessor()
|
void |
setBasedOnCachedData(boolean v)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int numberOfPatterns)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConditionalProbabilityStore(int numberOfCategories, int numberOfStates)
public ConditionalProbabilityStore(int numberOfCategories, int numberOfStates, ConditionalProbabilityStore.ExtraProcessor extraProcessor)
Method Detail |
public final ConditionalProbabilityStore getCopy()
public final boolean isHasExtraProcessor()
public final ConditionalProbabilityStore.ExtraProcessor getExtraProcessor()
public int getPatternCapacity()
public double[][][] getCurrentConditionalProbabilities()
public double[][] getCurrentConditionalProbabilities(int category)
category
- the transition category of interest
public double[][][] getConditionalProbabilityAccess(int numberOfPatterns, boolean resultsBasedOnCachedData)
numberOfPatterns
- An indication of how much space will be required. The result will always be big enough to accomodate the requested number of patterns.resultsBasedOnCachedData
- An indication of whether the new conditionals about to be stored are based on cached data
public double[][][] getConditionalProbabilityAccessNoChangeData(int numberOfPatterns, boolean resultsBasedOnCachedData)
numberOfPatterns
- An indication of how much space will be required. An exception is thrown if this number of patterns cannot be accomodated without being resized.resultsBasedOnCachedData
- An indication of whether the new conditionals about to be stored are based on cached data
java.lang.IllegalArgumentException
- if incompatible number of patternspublic double[][][] getIncompleteConditionalProbabilityAccess(int numberOfPatterns, boolean resultsBasedOnCachedData, boolean fix)
numberOfPatterns
- An indication of how much space will be required. The result will always be big enough to accomodate the requested number of patterns.resultsBasedOnCachedData
- An indication of whether the new conditionals about to be stored are based on cached data
public double calculateLogLikelihood(double[] categoryProbabilities, double[] equilibriumFrequencies, int[] patternWeights, int numberOfPatterns)
public double calculateLogLikelihood(double[] categoryProbabilities, double[] equilibriumFrequencies, int numberOfPatterns)
public double[] calculatePatternLogLikelihoods(double[] categoryProbabilities, double[] equilibriumFrequencies, int numberOfPatterns)
public double[][] calculateCategoryPatternConditionalProbabilities(double[] categoryProbabilities, double[] equilibriumFrequencies, int numberOfPatterns)
categoryProbabilities
- The prior probability of a site belonging to a particular categoryequilibriumFrequencies
- the prior probabibilities of seeing a particular statenumberOfPatterns
- The number of patterns
public boolean isBasedOnCachedData()
public void setBasedOnCachedData(boolean v)
public java.lang.String toString()
public java.lang.String toString(int numberOfPatterns)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |