beast2 icon indicating copy to clipboard operation
beast2 copied to clipboard

Treelikelihood does not allow creation of custom LikelihoodCore

Open rbouckaert opened this issue 4 years ago • 0 comments

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).

rbouckaert avatar May 02 '21 19:05 rbouckaert