HMSBEAGLE
1.0.0
|
Public Member Functions | |
GeneralBeagleImpl (final int tipCount, final int partialsBufferCount, final int compactBufferCount, final int stateCount, final int patternCount, final int eigenBufferCount, final int matrixBufferCount, final int categoryCount, final int scaleBufferCount) | |
void | finalize () throws Throwable |
void | setPatternWeights (final double[] patternWeights) |
void | setTipStates (int tipIndex, int[] states) |
void | getTipStates (int tipIndex, int[] states) |
void | setTipPartials (int tipIndex, double[] inPartials) |
void | setPartials (final int bufferIndex, final double[] partials) |
void | getPartials (final int bufferIndex, final int scaleIndex, final double[] partials) |
void | setEigenDecomposition (int eigenIndex, double[] eigenVectors, double[] inverseEigenValues, double[] eigenValues) |
void | setStateFrequencies (final int stateFrequenciesIndex, final double[] stateFrequencies) |
void | setCategoryWeights (final int categoryWeightsIndex, final double[] categoryWeights) |
void | setCategoryRates (double[] categoryRates) |
void | setTransitionMatrix (final int matrixIndex, final double[] inMatrix, final double paddedValue) |
void | getTransitionMatrix (final int matrixIndex, final double[] outMatrix) |
void | updateTransitionMatrices (final int eigenIndex, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDervativeIndices, final double[] edgeLengths, final int count) |
void | updatePartials (final int[] operations, final int operationCount, final int cumulativeScaleIndex) |
void | accumulateScaleFactors (int[] scaleIndices, int count, int outScaleIndex) |
void | removeScaleFactors (int[] scaleIndices, int count, int cumulativeScaleIndex) |
void | copyScaleFactors (int destScalingIndex, int srcScalingIndex) |
void | resetScaleFactors (int cumulativeScaleIndex) |
void | calculateRootLogLikelihoods (final int[] bufferIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, final int count, final double[] outSumLogLikelihood) |
void | calculateEdgeLogLikelihoods (final int[] parentBufferIndices, final int[] childBufferIndices, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDerivativeIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, final int count, final double[] outSumLogLikelihood, final double[] outSumFirstDerivative, final double[] outSumSecondDerivative) |
void | getSiteLogLikelihoods (final double[] outLogLikelihoods) |
InstanceDetails | getDetails () |
Static Public Attributes | |
static final boolean | DEBUG = false |
static final boolean | SCALING = true |
static final int | SCALING_FACTOR_COUNT = 254 |
static final int | SCALING_FACTOR_OFFSET = 126 |
Protected Member Functions | |
int | updateStatesStates (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) |
int | updateStatesPartials (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) |
int | updatePartialsPartials (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) |
Protected Attributes | |
final int | tipCount |
final int | partialsBufferCount |
final int | compactBufferCount |
final int | stateCount |
final int | patternCount |
final int | eigenBufferCount |
final int | matrixBufferCount |
final int | categoryCount |
int | partialsSize |
int | matrixSize |
double[][] | cMatrices |
double[][] | eigenValues |
double[][] | stateFrequencies |
double[] | categoryRates |
double[][] | categoryWeights |
double[] | patternWeights |
double[][] | partials |
int[][] | scalingFactorCounts |
int[][] | tipStates |
double[][] | matrices |
double[] | scalingFactors |
double[] | logScalingFactors |
Package Attributes | |
double[] | tmpPartials |
beagle.GeneralBeagleImpl.GeneralBeagleImpl | ( | final int | tipCount, |
final int | partialsBufferCount, | ||
final int | compactBufferCount, | ||
final int | stateCount, | ||
final int | patternCount, | ||
final int | eigenBufferCount, | ||
final int | matrixBufferCount, | ||
final int | categoryCount, | ||
final int | scaleBufferCount | ||
) | [inline] |
Constructor
stateCount | number of states |
void beagle.GeneralBeagleImpl.copyScaleFactors | ( | int | destScalingIndex, |
int | srcScalingIndex | ||
) | [inline] |
Copy scale factors
This function copies scale factors from one buffer to another.
instance | Instance number (input) |
destScalingIndex | Destination scaleBuffer (input) |
srcScalingIndex | Source scaleBuffer (input) |
Implements beagle.Beagle.
void beagle.GeneralBeagleImpl.finalize | ( | ) | throws Throwable [inline] |
Finalize this instance
This function finalizes the instance by releasing allocated memory
Implements beagle.Beagle.
InstanceDetails beagle.GeneralBeagleImpl.getDetails | ( | ) | [inline] |
void beagle.GeneralBeagleImpl.resetScaleFactors | ( | int | cumulativeScaleIndex | ) | [inline] |
Reset scalefactors
This function resets a cumulative scale buffer.
cumulativeScaleIndex | Index number of cumulative scaleBuffer (input) |
Implements beagle.Beagle.
void beagle.GeneralBeagleImpl.setPatternWeights | ( | final double[] | patternWeights | ) | [inline] |
Set the weights for each pattern
patternWeights | Array containing patternCount weights |
Implements beagle.Beagle.
void beagle.GeneralBeagleImpl.setTipStates | ( | int | tipIndex, |
int[] | states | ||
) | [inline] |
Sets partials for a tip - these are numbered from 0 and remain constant throughout the run.
tipIndex | the tip index |
states | an array of patternCount state indices |
void beagle.GeneralBeagleImpl.updatePartials | ( | final int[] | operations, |
final int | operationCount, | ||
final int | cumulativeScaleIndex | ||
) | [inline] |
Operations list is a list of 7-tuple integer indices, with one 7-tuple per operation. Format of 7-tuple operation: {destinationPartials, destinationScaleWrite, destinationScaleRead, child1Partials, child1TransitionMatrix, child2Partials, child2TransitionMatrix}
int beagle.GeneralBeagleImpl.updateStatesPartials | ( | int | bufferIndex1, |
int | matrixIndex1, | ||
int | bufferIndex2, | ||
int | matrixIndex2, | ||
int | bufferIndex3 | ||
) | [inline, protected] |
Calculates partial likelihoods at a node when one child has states and one has partials.
Reimplemented in beagle.FourStateBeagleImpl.
int beagle.GeneralBeagleImpl.updateStatesStates | ( | int | bufferIndex1, |
int | matrixIndex1, | ||
int | bufferIndex2, | ||
int | matrixIndex2, | ||
int | bufferIndex3 | ||
) | [inline, protected] |
Calculates partial likelihoods at a node when both children have states.
Reimplemented in beagle.FourStateBeagleImpl.