use of dr.evomodel.operators.ImportanceNarrowExchange in project beast-mcmc by beast-dev.
the class ImportanceNarrowExchangeParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
final PatternList patterns = (PatternList) xo.getChild(PatternList.class);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
final double epsilon = xo.getAttribute(EPSILON, 0.1);
try {
return new ImportanceNarrowExchange(treeModel, patterns, epsilon, weight);
} catch (Exception e) {
throw new XMLParseException(e.getMessage());
}
}
Aggregations