HMSBEAGLE
1.0.0
|
Public Member Functions | |
BeagleJNIImpl (int tipCount, int partialsBufferCount, int compactBufferCount, int stateCount, int patternCount, int eigenBufferCount, int matrixBufferCount, int categoryCount, int scaleBufferCount, final int[] resourceList, long preferenceFlags, long requirementFlags) | |
void | finalize () throws Throwable |
void | setPatternWeights (final double[] patternWeights) |
void | setTipStates (int tipIndex, final int[] states) |
void | getTipStates (int tipIndex, final int[] states) |
void | setTipPartials (int tipIndex, final double[] partials) |
void | setPartials (int bufferIndex, final double[] partials) |
void | getPartials (int bufferIndex, int scaleIndex, final double[]outPartials) |
void | setEigenDecomposition (int eigenIndex, final double[] eigenVectors, final double[] inverseEigenValues, final double[] eigenValues) |
void | setStateFrequencies (int stateFrequenciesIndex, final double[] stateFrequencies) |
void | setCategoryWeights (int categoryWeightsIndex, final double[] categoryWeights) |
void | setCategoryRates (double[] inCategoryRates) |
void | setTransitionMatrix (int matrixIndex, final double[] inMatrix, double paddedValue) |
void | getTransitionMatrix (int matrixIndex, final double[] outMatrix) |
void | updateTransitionMatrices (int eigenIndex, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDervativeIndices, final double[] edgeLengths, int count) |
void | updatePartials (final int[] operations, final int operationCount, final int cumulativeScaleIndex) |
void | accumulateScaleFactors (final int[] scaleIndices, final int count, final int cumulativeScaleIndex) |
void | removeScaleFactors (int[] scaleIndices, int count, int cumulativeScaleIndex) |
void | copyScaleFactors (int destScalingIndex, int srcScalingIndex) |
void | resetScaleFactors (int cumulativeScaleIndex) |
void | calculateRootLogLikelihoods (int[] bufferIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, 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, int count, final double[] outSumLogLikelihood, final double[] outSumFirstDerivative, final double[] outSumSecondDerivative) |
void | getSiteLogLikelihoods (final double[] outLogLikelihoods) |
InstanceDetails | getDetails () |
![]() | |
void | setCategoryRates (final double[] inCategoryRates) |
void | getTransitionMatrix (int matrixIndex, double[] outMatrix) |
void | updatePartials (final int[] operations, int operationCount, int cumulativeScaleIndex) |
void | removeScaleFactors (final int[] scaleIndices, final int count, final int cumulativeScaleIndex) |
void | calculateRootLogLikelihoods (int[] bufferIndices, int[] categoryWeightsIndices, int[] stateFrequenciesIndices, int[] cumulativeScaleIndices, int count, double[] outSumLogLikelihood) |
void | calculateEdgeLogLikelihoods (int[] parentBufferIndices, int[] childBufferIndices, int[] probabilityIndices, int[] firstDerivativeIndices, int[] secondDerivativeIndices, int[] categoryWeightsIndices, int[] stateFrequenciesIndices, int[] cumulativeScaleIndices, int count, double[] outSumLogLikelihood, double[] outSumFirstDerivative, double[] outSumSecondDerivative) |
void | getSiteLogLikelihoods (double[] outLogLikelihoods) |
Additional Inherited Members | |
![]() | |
static int | OPERATION_TUPLE_SIZE = 7 |
static int | NONE = -1 |
|
inline |
Accumulate scale factors
This function adds (log) scale factors from a list of scaleBuffers to a cumulative scale buffer. It is used to calculate the marginal scaling at a specific node for each site.
scaleIndices | List of scaleBuffers to add (input) |
count | Number of scaleBuffers in list (input) |
cumulativeScaleIndex | Index number of scaleBuffer to accumulate factors into (input) |
Implements beagle.Beagle.
|
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.
|
inline |
Finalize this instance
This function finalizes the instance by releasing allocated memory
Implements beagle.Beagle.
|
inline |
|
inline |
Get partials from an instance buffer
This function copies an array of partials from an instance buffer. The inPartials array should be stateCount * patternCount * categoryCount in length.
bufferIndex | Index of destination partialsBuffer (input) |
scaleIndex | Index of scaleBuffer to apply to partials (input) |
outPartials | Pointer to which to receive partialsBuffer (output) |
Implements beagle.Beagle.
|
inline |
Get the compressed state representation for tip node
This function copies a compact state representation from an instance buffer. Compact state representation is an array of states: 0 to stateCount - 1 (missing = stateCount). The inStates array should be patternCount in length (replication across categoryCount is not required).
tipIndex | Index of destination partialsBuffer (input) |
outStates | Pointer to compressed states (input) |
Implements beagle.Beagle.
|
inline |
Reset scalefactors
This function resets a cumulative scale buffer.
cumulativeScaleIndex | Index number of cumulative scaleBuffer (input) |
Implements beagle.Beagle.
|
inline |
Set a set of category weights. These will probably correspond to an eigen-system.
categoryWeightsIndex | the index of the buffer |
categoryWeights | the array of weights |
Implements beagle.Beagle.
|
inline |
Set an eigen-decomposition buffer
This function copies an eigen-decomposition into a instance buffer.
eigenIndex | Index of eigen-decomposition buffer (input) |
inEigenVectors | Flattened matrix (stateCount x stateCount) of eigen-vectors (input) |
inInverseEigenVectors | Flattened matrix (stateCount x stateCount) of inverse-eigen-vectors (input) |
inEigenValues | Vector of eigenvalues |
Implements beagle.Beagle.
|
inline |
Set an instance partials buffer
This function copies an array of partials into an instance buffer. The inPartials array should be stateCount * patternCount * categoryCount in length.
bufferIndex | Index of destination partialsBuffer (input) |
inPartials | Pointer to partials values to set (input) |
Implements beagle.Beagle.
|
inline |
Set the weights for each pattern
patternWeights | Array containing patternCount weights |
Implements beagle.Beagle.
|
inline |
Set a set of state frequences. These will probably correspond to an eigen-system.
stateFrequenciesIndex | the index of the frequency buffer |
stateFrequencies | the array of frequences (stateCount) |
Implements beagle.Beagle.
|
inline |
Set an instance partials buffer
This function copies an array of partials into an instance buffer. The inPartials array should be stateCount * patternCount in length. For most applications this will be used to set the partial likelihoods for the observed states. Internally, the partials will be copied categoryCount times.
tipIndex | Index of destination partialsBuffer (input) |
inPartials | Pointer to partials values to set (input) |
Implements beagle.Beagle.
|
inline |
Set the compressed state representation for tip node
This function copies a compact state representation into an instance buffer. Compact state representation is an array of states: 0 to stateCount - 1 (missing = stateCount). The inStates array should be patternCount in length (replication across categoryCount is not required).
tipIndex | Index of destination partialsBuffer (input) |
inStates | Pointer to compressed states (input) |
Implements beagle.Beagle.
|
inline |
This function copies a finite-time transition probability matrix into a matrix buffer. This function is used when the application wishes to explicitly set the transition probability matrix rather than using the setEigenDecomposition and updateTransitionMatrices functions. The inMatrix array should be of size stateCount * stateCount * categoryCount and will contain one matrix for each rate category.
This function copies a finite-time transition probability matrix into a matrix buffer.
matrixIndex | Index of matrix buffer (input) |
inMatrix | Pointer to source transition probability matrix (input) |
paddedValue | Value to be used for padding for ambiguous states (e.g. 1 for probability matrices, 0 for derivative matrices) (input) |
Implements beagle.Beagle.
|
inline |
Calculate a list of transition probability matrices
This function calculates a list of transition probabilities matrices and their first and second derivatives (if requested).
eigenIndex | Index of eigen-decomposition buffer (input) |
probabilityIndices | List of indices of transition probability matrices to update (input) |
firstDerivativeIndices | List of indices of first derivative matrices to update (input, NULL implies no calculation) |
secondDervativeIndices | List of indices of second derivative matrices to update (input, NULL implies no calculation) |
edgeLengths | List of edge lengths with which to perform calculations (input) |
count | Length of lists |
Implements beagle.Beagle.