Search in sources :

Example 1 with BufferIndexHelper

use of dr.evomodel.treedatalikelihood.BufferIndexHelper in project beast-mcmc by beast-dev.

the class Partition method setBufferHelpers.

// END: setSubstitutionModelDelegate
private void setBufferHelpers() {
    nodeCount = treeModel.getNodeCount();
    matrixBufferHelper = new BufferIndexHelper(nodeCount, 0);
    tipCount = treeModel.getExternalNodeCount();
    internalNodeCount = treeModel.getInternalNodeCount();
    partialBufferHelper = new BufferIndexHelper(nodeCount, tipCount);
    scaleBufferHelper = new BufferIndexHelper(internalNodeCount + 1, 0);
}
Also used : BufferIndexHelper(dr.evomodel.treedatalikelihood.BufferIndexHelper)

Example 2 with BufferIndexHelper

use of dr.evomodel.treedatalikelihood.BufferIndexHelper 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);
}
Also used : DataType(dr.evolution.datatype.DataType) SubstitutionModelDelegate(dr.evomodel.treelikelihood.SubstitutionModelDelegate) BufferIndexHelper(dr.evomodel.treedatalikelihood.BufferIndexHelper)

Aggregations

BufferIndexHelper (dr.evomodel.treedatalikelihood.BufferIndexHelper)2 DataType (dr.evolution.datatype.DataType)1 SubstitutionModelDelegate (dr.evomodel.treelikelihood.SubstitutionModelDelegate)1