use of dr.evomodel.treelikelihood.SubstitutionModelDelegate in project beast-mcmc by beast-dev.
the class BeagleBranchLikelihood method loadBeagleInstance.
// END: finalizeBeagle
private void loadBeagleInstance() {
this.substitutionModelDelegate = new SubstitutionModelDelegate(treeModel, branchModel);
DataType dataType = freqModel.getDataType();
int partitionSiteCount = patternList.getPatternCount();
nodeCount = treeModel.getNodeCount();
this.matrixBufferHelper = new BufferIndexHelper(nodeCount, 0);
int tipCount = treeModel.getExternalNodeCount();
int internalNodeCount = treeModel.getInternalNodeCount();
partialBufferHelper = new BufferIndexHelper(nodeCount, tipCount);
BufferIndexHelper scaleBufferHelper = new BufferIndexHelper(internalNodeCount + 1, 0);
int compactPartialsCount = tipCount;
int stateCount = dataType.getStateCount();
int patternCount = partitionSiteCount;
int siteRateCategoryCount = siteRateModel.getCategoryCount();
int[] resourceList = new int[] { 0 };
long preferenceFlags = 0;
long requirementFlags = 0;
beagle = //
BeagleFactory.loadBeagleInstance(//
tipCount, //
partialBufferHelper.getBufferCount(), //
compactPartialsCount, //
stateCount, //
patternCount, //
substitutionModelDelegate.getEigenBufferCount(), //
substitutionModelDelegate.getMatrixBufferCount(), //
siteRateCategoryCount, //
scaleBufferHelper.getBufferCount(), //
resourceList, //
preferenceFlags, //
requirementFlags);
}
Aggregations