use of dr.evomodel.operators.RateExchangeOperator in project beast-mcmc by beast-dev.
the class RateExchangeOperatorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
DefaultTreeModel treeModel = (DefaultTreeModel) xo.getChild(DefaultTreeModel.class);
double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
boolean swapRates = xo.getBooleanAttribute(SWAP_RATES);
boolean swapTraits = xo.getBooleanAttribute(SWAP_TRAITS);
boolean swapAtRoot = xo.getBooleanAttribute(SWAP_AT_ROOT);
boolean moveHeight = xo.getBooleanAttribute(MOVE_HEIGHT);
return new RateExchangeOperator(treeModel, weight, swapRates, swapTraits, swapAtRoot, moveHeight);
}
Aggregations