Search in sources :

Example 1 with RateExchangeOperator

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

Aggregations

RateExchangeOperator (dr.evomodel.operators.RateExchangeOperator)1 DefaultTreeModel (dr.evomodel.tree.DefaultTreeModel)1