beast2
beast2 copied to clipboard
Treelikelihood does not allow creation of custom LikelihoodCore
The LikelihoodCore is created in initAndValidate() in this fragment:
if (stateCount == 4) {
return new BeerLikelihoodCore4();
} else {
return new BeerLikelihoodCore(stateCount);
}
Putting this in a separate method, say createLikelihoodCore(int stateCount) allows derived classes to implement their own custom version (for instance in the beastbooster package).