use of dr.evomodel.operators.TreeUniform in project beast-mcmc by beast-dev.
the class TreeUniformParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
final int n = xo.getAttribute(COUNT, 2);
if (!(n == 2 || n == 3)) {
throw new XMLParseException("Sorry, only moves of 2 or 3 nodes implemented.");
}
return new TreeUniform(n, treeModel, weight);
}
Aggregations