use of dr.app.beauti.options.AbstractPartitionData in project beast-mcmc by beast-dev.
the class AncestralStatesComponentGenerator method usesInsertionPoint.
public boolean usesInsertionPoint(InsertionPoint point) {
AncestralStatesComponentOptions component = (AncestralStatesComponentOptions) options.getComponentOptions(AncestralStatesComponentOptions.class);
boolean reconstructAtNodes = false;
boolean reconstructAtMRCA = false;
boolean countingStates = false;
boolean dNdSRobustCounting = false;
for (AbstractPartitionData partition : options.getDataPartitions()) {
if (component.reconstructAtNodes(partition))
reconstructAtNodes = true;
if (component.reconstructAtMRCA(partition))
reconstructAtMRCA = true;
if (component.isCountingStates(partition))
countingStates = true;
if (component.dNdSRobustCounting(partition))
dNdSRobustCounting = true;
}
if (!reconstructAtNodes && !reconstructAtMRCA && !countingStates && !dNdSRobustCounting) {
return false;
}
switch(point) {
case IN_FILE_LOG_PARAMETERS:
return countingStates || dNdSRobustCounting;
case IN_TREE_LIKELIHOOD:
return countingStates;
case IN_TREES_LOG:
return reconstructAtNodes || countingStates || dNdSRobustCounting;
case AFTER_OPERATORS:
return dNdSRobustCounting;
case AFTER_TREES_LOG:
return reconstructAtMRCA || dNdSRobustCounting;
case AFTER_MCMC:
return dNdSRobustCounting;
default:
return false;
}
}
Aggregations