use of dr.evomodel.operators.TreeBitMoveOperator in project beast-mcmc by beast-dev.
the class TreeBitMoveOperatorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
String trait1 = null;
String trait2 = null;
if (xo.hasAttribute(INDICTATOR_TRAIT))
trait1 = xo.getStringAttribute(INDICTATOR_TRAIT);
if (xo.hasAttribute(TRAIT2))
trait2 = xo.getStringAttribute(TRAIT2);
return new TreeBitMoveOperator(treeModel, trait1, trait2, weight);
}
Aggregations