Search in sources :

Example 1 with EmpiricalTreeDistributionOperator

use of dr.evomodel.operators.EmpiricalTreeDistributionOperator in project beast-mcmc by beast-dev.

the class EmpiricalTreeDistributionOperatorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    boolean metropolisHastings = false;
    if (xo.hasAttribute(EmpiricalTreeDistributionOperator.METROPOLIS_HASTINGS)) {
        metropolisHastings = xo.getBooleanAttribute(EmpiricalTreeDistributionOperator.METROPOLIS_HASTINGS);
    }
    final EmpiricalTreeDistributionModel treeModel = (EmpiricalTreeDistributionModel) xo.getChild(EmpiricalTreeDistributionModel.class);
    return new EmpiricalTreeDistributionOperator(treeModel, metropolisHastings, weight);
}
Also used : EmpiricalTreeDistributionOperator(dr.evomodel.operators.EmpiricalTreeDistributionOperator) EmpiricalTreeDistributionModel(dr.evomodel.tree.EmpiricalTreeDistributionModel)

Aggregations

EmpiricalTreeDistributionOperator (dr.evomodel.operators.EmpiricalTreeDistributionOperator)1 EmpiricalTreeDistributionModel (dr.evomodel.tree.EmpiricalTreeDistributionModel)1