Search in sources :

Example 1 with TreeBitMoveOperator

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);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) TreeBitMoveOperator(dr.evomodel.operators.TreeBitMoveOperator)

Aggregations

TreeBitMoveOperator (dr.evomodel.operators.TreeBitMoveOperator)1 TreeModel (dr.evomodel.tree.TreeModel)1