use of dr.evomodel.operators.EmpiricalTreeDistributionOperator in project beast-mcmc by beast-dev.
the class EmpiricalTreeDistributionOperatorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
boolean metropolisHastings = false;
if (xo.hasAttribute(EmpiricalTreeDistributionOperator.METROPOLIS_HASTINGS)) {
metropolisHastings = xo.getBooleanAttribute(EmpiricalTreeDistributionOperator.METROPOLIS_HASTINGS);
}
final EmpiricalTreeDistributionModel treeModel = (EmpiricalTreeDistributionModel) xo.getChild(EmpiricalTreeDistributionModel.class);
return new EmpiricalTreeDistributionOperator(treeModel, metropolisHastings, weight);
}
Aggregations