.TH "beagle.BeagleJNIImpl" 3 "Fri May 25 2012" "Version 1.0.0" "HMSBEAGLE" \" -*- nroff -*- .ad l .nh .SH NAME beagle.BeagleJNIImpl \- .SH SYNOPSIS .br .PP .PP Inherits \fBbeagle\&.Beagle\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBBeagleJNIImpl\fP (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)" .br .ti -1c .RI "void \fBfinalize\fP () throws Throwable " .br .ti -1c .RI "void \fBsetPatternWeights\fP (final double[] patternWeights)" .br .ti -1c .RI "void \fBsetTipStates\fP (int tipIndex, final int[] states)" .br .ti -1c .RI "void \fBgetTipStates\fP (int tipIndex, final int[] states)" .br .ti -1c .RI "void \fBsetTipPartials\fP (int tipIndex, final double[] partials)" .br .ti -1c .RI "void \fBsetPartials\fP (int bufferIndex, final double[] partials)" .br .ti -1c .RI "void \fBgetPartials\fP (int bufferIndex, int scaleIndex, final double[]outPartials)" .br .ti -1c .RI "void \fBsetEigenDecomposition\fP (int eigenIndex, final double[] eigenVectors, final double[] inverseEigenValues, final double[] eigenValues)" .br .ti -1c .RI "void \fBsetStateFrequencies\fP (int stateFrequenciesIndex, final double[] stateFrequencies)" .br .ti -1c .RI "void \fBsetCategoryWeights\fP (int categoryWeightsIndex, final double[] categoryWeights)" .br .ti -1c .RI "void \fBsetCategoryRates\fP (double[] inCategoryRates)" .br .ti -1c .RI "void \fBsetTransitionMatrix\fP (int matrixIndex, final double[] inMatrix, double paddedValue)" .br .ti -1c .RI "void \fBgetTransitionMatrix\fP (int matrixIndex, final double[] outMatrix)" .br .ti -1c .RI "void \fBupdateTransitionMatrices\fP (int eigenIndex, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDervativeIndices, final double[] edgeLengths, int count)" .br .ti -1c .RI "void \fBupdatePartials\fP (final int[] operations, final int operationCount, final int cumulativeScaleIndex)" .br .ti -1c .RI "void \fBaccumulateScaleFactors\fP (final int[] scaleIndices, final int count, final int cumulativeScaleIndex)" .br .ti -1c .RI "void \fBremoveScaleFactors\fP (int[] scaleIndices, int count, int cumulativeScaleIndex)" .br .ti -1c .RI "void \fBcopyScaleFactors\fP (int destScalingIndex, int srcScalingIndex)" .br .ti -1c .RI "void \fBresetScaleFactors\fP (int cumulativeScaleIndex)" .br .ti -1c .RI "void \fBcalculateRootLogLikelihoods\fP (int[] bufferIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, int count, final double[] outSumLogLikelihood)" .br .ti -1c .RI "void \fBcalculateEdgeLogLikelihoods\fP (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)" .br .ti -1c .RI "void \fBgetSiteLogLikelihoods\fP (final double[] outLogLikelihoods)" .br .ti -1c .RI "\fBInstanceDetails\fP \fBgetDetails\fP ()" .br .in -1c .SS "Additional Inherited Members" .SH "Member Function Documentation" .PP .SS "void beagle\&.BeagleJNIImpl\&.accumulateScaleFactors (final int[]scaleIndices, final intcount, final intcumulativeScaleIndex)\fC [inline]\fP" Accumulate scale factors .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIscaleIndices\fP List of scaleBuffers to add (input) .br \fIcount\fP Number of scaleBuffers in list (input) .br \fIcumulativeScaleIndex\fP Index number of scaleBuffer to accumulate factors into (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.copyScaleFactors (intdestScalingIndex, intsrcScalingIndex)\fC [inline]\fP" Copy scale factors .PP This function copies scale factors from one buffer to another\&. .PP \fBParameters:\fP .RS 4 \fIinstance\fP Instance number (input) .br \fIdestScalingIndex\fP Destination scaleBuffer (input) .br \fIsrcScalingIndex\fP Source scaleBuffer (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.finalize () throws Throwable \fC [inline]\fP" Finalize this instance .PP This function finalizes the instance by releasing allocated memory .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "\fBInstanceDetails\fP beagle\&.BeagleJNIImpl\&.getDetails ()\fC [inline]\fP" Get a details class for this instance .PP \fBReturns:\fP .RS 4 .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.getPartials (intbufferIndex, intscaleIndex, final double[]outPartials)\fC [inline]\fP" Get partials from an instance buffer .PP This function copies an array of partials from an instance buffer\&. The inPartials array should be stateCount * patternCount * categoryCount in length\&. .PP \fBParameters:\fP .RS 4 \fIbufferIndex\fP Index of destination partialsBuffer (input) .br \fIscaleIndex\fP Index of scaleBuffer to apply to partials (input) .br \fIoutPartials\fP Pointer to which to receive partialsBuffer (output) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.getTipStates (inttipIndex, final int[]outStates)\fC [inline]\fP" Get the compressed state representation for tip node .PP 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)\&. .PP \fBParameters:\fP .RS 4 \fItipIndex\fP Index of destination partialsBuffer (input) .br \fIoutStates\fP Pointer to compressed states (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.resetScaleFactors (intcumulativeScaleIndex)\fC [inline]\fP" Reset scalefactors .PP This function resets a cumulative scale buffer\&. .PP \fBParameters:\fP .RS 4 \fIcumulativeScaleIndex\fP Index number of cumulative scaleBuffer (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setCategoryWeights (intcategoryWeightsIndex, final double[]categoryWeights)\fC [inline]\fP" Set a set of category weights\&. These will probably correspond to an eigen-system\&. .PP \fBParameters:\fP .RS 4 \fIcategoryWeightsIndex\fP the index of the buffer .br \fIcategoryWeights\fP the array of weights .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setEigenDecomposition (inteigenIndex, final double[]inEigenVectors, final double[]inInverseEigenVectors, final double[]inEigenValues)\fC [inline]\fP" Set an eigen-decomposition buffer .PP This function copies an eigen-decomposition into a instance buffer\&. .PP \fBParameters:\fP .RS 4 \fIeigenIndex\fP Index of eigen-decomposition buffer (input) .br \fIinEigenVectors\fP Flattened matrix (stateCount x stateCount) of eigen-vectors (input) .br \fIinInverseEigenVectors\fP Flattened matrix (stateCount x stateCount) of inverse-eigen-vectors (input) .br \fIinEigenValues\fP Vector of eigenvalues .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setPartials (intbufferIndex, final double[]inPartials)\fC [inline]\fP" Set an instance partials buffer .PP This function copies an array of partials into an instance buffer\&. The inPartials array should be stateCount * patternCount * categoryCount in length\&. .PP \fBParameters:\fP .RS 4 \fIbufferIndex\fP Index of destination partialsBuffer (input) .br \fIinPartials\fP Pointer to partials values to set (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setPatternWeights (final double[]patternWeights)\fC [inline]\fP" Set the weights for each pattern .PP \fBParameters:\fP .RS 4 \fIpatternWeights\fP Array containing patternCount weights .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setStateFrequencies (intstateFrequenciesIndex, final double[]stateFrequencies)\fC [inline]\fP" Set a set of state frequences\&. These will probably correspond to an eigen-system\&. .PP \fBParameters:\fP .RS 4 \fIstateFrequenciesIndex\fP the index of the frequency buffer .br \fIstateFrequencies\fP the array of frequences (stateCount) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setTipPartials (inttipIndex, final double[]inPartials)\fC [inline]\fP" Set an instance partials buffer .PP 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\&. .PP \fBParameters:\fP .RS 4 \fItipIndex\fP Index of destination partialsBuffer (input) .br \fIinPartials\fP Pointer to partials values to set (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setTipStates (inttipIndex, final int[]inStates)\fC [inline]\fP" Set the compressed state representation for tip node .PP 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)\&. .PP \fBParameters:\fP .RS 4 \fItipIndex\fP Index of destination partialsBuffer (input) .br \fIinStates\fP Pointer to compressed states (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.setTransitionMatrix (intmatrixIndex, final double[]inMatrix, doublepaddedValue)\fC [inline]\fP" 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\&. .PP This function copies a finite-time transition probability matrix into a matrix buffer\&. .PP \fBParameters:\fP .RS 4 \fImatrixIndex\fP Index of matrix buffer (input) .br \fIinMatrix\fP Pointer to source transition probability matrix (input) .br \fIpaddedValue\fP Value to be used for padding for ambiguous states (e\&.g\&. 1 for probability matrices, 0 for derivative matrices) (input) .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SS "void beagle\&.BeagleJNIImpl\&.updateTransitionMatrices (inteigenIndex, final int[]probabilityIndices, final int[]firstDerivativeIndices, final int[]secondDervativeIndices, final double[]edgeLengths, intcount)\fC [inline]\fP" Calculate a list of transition probability matrices .PP This function calculates a list of transition probabilities matrices and their first and second derivatives (if requested)\&. .PP \fBParameters:\fP .RS 4 \fIeigenIndex\fP Index of eigen-decomposition buffer (input) .br \fIprobabilityIndices\fP List of indices of transition probability matrices to update (input) .br \fIfirstDerivativeIndices\fP List of indices of first derivative matrices to update (input, NULL implies no calculation) .br \fIsecondDervativeIndices\fP List of indices of second derivative matrices to update (input, NULL implies no calculation) .br \fIedgeLengths\fP List of edge lengths with which to perform calculations (input) .br \fIcount\fP Length of lists .RE .PP .PP Implements \fBbeagle\&.Beagle\fP\&. .SH "Author" .PP Generated automatically by Doxygen for HMSBEAGLE from the source code\&.