Search in sources :

Example 1 with TreeUniform

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

Aggregations

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